o
    ¢Äi&	  ã                   @   sô   d Z ddlZddlZejd dkZejdd… dkZejdd… dkZejdd… dkZejd dkZejdd… dkZ	erLe
fZeefZeZeZd	Zn efZesSerXe
efZne
fZeZescerhesheZd
ZneZd	Zdd„ ZG dd„ deƒZdS )zm A tiny version of `six` to help with backwards compability. Also includes
 compatibility helpers for numpy. é    Né   )r   é   )r   é   é   )r   r   é   )r   é   ú?z<bc                  C   sB   z	t  d¡ d} W n ty   d} Y nw | rddl}|S d}|S )zZ
    Returns the numpy module if it exists on the system,
    otherwise returns None.
    ÚnumpyTFr   N)ÚimpÚfind_moduleÚImportErrorr	   )Znumpy_existsÚnp© r   úL/home/kim/smarthome/.venv/lib/python3.10/site-packages/flatbuffers/compat.pyÚimport_numpy2   s   
ÿþr   c                   @   s   e Zd ZdZdS )ÚNumpyRequiredForThisFeaturezo
    Error raised when user tries to use a feature that
    requires numpy without having numpy installed.
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   I   s    r   )r   Úsysr
   Úversion_infoÚPY2ZPY26ZPY27ZPY275ÚPY3ÚPY34ÚstrÚstring_typesÚbytesÚ	bytearrayZbinary_typesÚrangeZ
range_funcÚ
memoryviewZmemoryview_typeZstruct_bool_declÚunicodeÚxrangeÚbufferr   ÚRuntimeErrorr   r   r   r   r   Ú<module>   s6   
