Edit File: copyreg.cpython-38.opt-1.pyc
U ����@��d�����������������������@���s����d�Z�dddddgZi�Zddd�Zdd��Zze�W�n�ek rD���Y�nX�d d ��Zeeee��dd��Zd Z dd��Z dd��Zdd��Zdd��Z i�Zi�Zi�Zdd��Zdd��Zdd��ZdS�)z�Helper to provide extensibility for pickle. This is only useful to add pickle support for extension types defined in C, not for instances of user-defined classes. �pickle�constructor� add_extension�remove_extension�clear_extension_cacheNc�����������������C���s,���t�|�std��|t|�<�|d�k r(t|��d�S�)Nz$reduction functions must be callable)�callable� TypeError�dispatch_tabler���)�ob_type�pickle_function�constructor_ob��r����,/opt/alt/python38/lib64/python3.8/copyreg.pyr������s ����c�����������������C���s���t�|��std��d�S�)Nzconstructors must be callable)r���r���)�objectr���r���r ���r������s����c�����������������C���s���t�|�j|�jffS��N)�complex�real�imag)�cr���r���r ����pickle_complex"���s����r���c�����������������C���s<���|t�krt��|��}n$|�|�|�}|jt�jkr8|�||��|S�r���)r����__new__�__init__)�cls�base�state�objr���r���r ����_reconstructor)���s����r���i���c�����������������C���s����|�j�}|jD�]}t|d�r|jt@�s�q.qt}|tkr<d�}n"||krVtd|j�d���||��}|||f}z |�j}W�n\�t k r����t |�dd��r�td|j�d|����d��z |�j}W�n�t k r����d�}Y�nX�Y�nX�|��}|r�t||fS�t|fS�d�S�)N� __flags__zcannot pickle z object� __slots__zf object: a class that defines __slots__ without defining __getstate__ cannot be pickled with protocol ) � __class__�__mro__�hasattrr���� _HEAPTYPEr���r����__name__�__getstate__�AttributeError�getattr�__dict__r���)�self�protor���r���r����args�getstate�dictr���r���r ���� _reduce_ex6���s4���� � r,���c�����������������G���s���|�j�|�f|���S�r����r���)r���r)���r���r���r ���� __newobj__Z���s����r.���c�����������������C���s���|�j�|�f|�|�S�)zUsed by pickle protocol 4, instead of __newobj__ to allow classes with keyword-only arguments to be pickled correctly. r-���)r���r)����kwargsr���r���r ���� __newobj_ex__]���s����r0���c�����������������C���s����|�j��d�}|dk r|S�g�}t|�d�s(n�|�jD�]�}d|j�kr.|j�d�}t|t�rV|f}|D�]^}|dkrjqZqZ|�d�r�|�d�s�|j� d�}|r�|� d||f���q�|� |��qZ|� |��qZq.z ||�_W�n���Y�nX�|S�)a���Return a list of slot names for a given class. This needs to find slots defined by the class and its bases, so we can't simply return the __slots__ attribute. We must walk down the Method Resolution Order and concatenate the __slots__ of each class found there. (This assumes classes don't modify their __slots__ attribute to misrepresent their slots after the class is defined.) � __slotnames__Nr���)r&����__weakref__�__�_z_%s%s)r&����getr ���r���� isinstance�str� startswith�endswithr"����lstrip�appendr1���)r����namesr����slots�name�strippedr���r���r ���� _slotnamesc���s2���� r@���c�����������������C���s����t�|�}d|��krdks&n�td��|�|f}t�|�|krNt�|�|krNdS�|tkrjtd|t|�f���|tkr�td|t|�f���|t|<�|t|<�dS�)zRegister an extension code.����i���zcode out of rangeNz)key %s is already registered with code %sz$code %s is already in use for key %s)�int� ValueError�_extension_registryr5����_inverted_registry��moduler>����code�keyr���r���r ���r�������s$����� � �c�����������������C���sR���|�|f}t��|�|ks$t�|�|kr4td||f���t�|=�t|=�|tkrNt|=�dS�)z0Unregister an extension code. For testing only.z%key %s is not registered with code %sN)rD���r5���rE���rC����_extension_cacherF���r���r���r ���r�������s������c�������������������C���s���t�����d�S�r���)rJ����clearr���r���r���r ���r�������s����)N)�__doc__�__all__r���r���r���r���� NameErrorr���r���r!���r,���r.���r0���r@���rD���rE���rJ���r���r���r���r���r���r���r ����<module>���s4������ $<