o
    h>xdÜ  ã                   @   sŽ   d dl mZmZmZmZmZmZmZ ddlm	Z	 e	ƒ  d dl
mZ d dlmZmZ zd dlmZ W n ey<   eZY nw G dd„ deƒZd	S )
é    )Únested_scopesÚ
generatorsÚdivisionÚabsolute_importÚwith_statementÚprint_functionÚunicode_literalsé   )Úbackport)Ú
native_str)ÚABCMetaÚabstractmethod)ÚABCc                       s¶   e Zd ZeZe				ddd„ƒZ‡ fdd„Zeedd„ ƒƒZ	e	j
ed	d„ ƒƒZ	eed
d„ ƒƒZej
edd„ ƒƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZ‡  ZS )ÚPropertyNFc                 C   s(   d | _ || _|| _|| _d | _|| _d S ©N)Ú_typesÚtypesÚnameÚrequiredÚ	_versionsÚversions)Úselfr   r   r   r   © r   ú=D:\rfid_django\env\Lib\site-packages\serial/abc/properties.pyÚ__init__   s   
zProperty.__init__c                    s&   dD ]
}t | |ƒs dS qtƒ  |¡S )zV
        Check an instance of a subclass to ensure it has required properties
        )r   r   r   r   F)ÚhasattrÚsuperÚ__instancecheck__)r   ÚinstanceÚ	attribute©Ú	__class__r   r   r   (   s
   
ÿzProperty.__instancecheck__c                 C   ó   d S r   r   ©r   r   r   r   r   :   ó   zProperty.typesc                 C   r"   r   r   )r   Ztypes_or_propertiesr   r   r   r   @   r$   c                 C   r"   r   r   r#   r   r   r   r   F   r$   zProperty.versionsc                 C   r"   r   r   )r   r   r   r   r   r   L   s   c                 C   r"   r   r   ©r   Údatar   r   r   Ú	unmarshalU   ó   zProperty.unmarshalc                 C   r"   r   r   r%   r   r   r   ÚmarshalZ   r(   zProperty.marshalc                 C   r"   r   r   r#   r   r   r   Ú__repr___   r(   zProperty.__repr__c                 C   r"   r   r   r#   r   r   r   Ú__copy__d   r(   zProperty.__copy__c                 C   r"   r   r   )r   Úmemor   r   r   Ú__deepcopy__i   r(   zProperty.__deepcopy__)NNFN)Ú__name__Ú
__module__Ú__qualname__r   Z__metaclass__r   r   r   Úpropertyr   Úsetterr   r'   r)   r*   r+   r-   Ú__classcell__r   r   r    r   r      s>    û



r   N)Ú
__future__r   r   r   r   r   r   r   Zutilities.compatibilityr
   Zfuture.utilsr   Úabcr   r   r   ÚImportErrorÚobjectr   r   r   r   r   Ú<module>   s   $ÿ