%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib64/python3.9/site-packages/numpy/compat/__pycache__/
Upload File :
Create Path :
Current File : //lib64/python3.9/site-packages/numpy/compat/__pycache__/py3k.cpython-39.pyc

a

z[yc�@s�dZgd�ZddlZddlZddlmZddlZzddlZWne	yVddlZYn0e
Ze
fZe
Ze
ZeZdd�Zdd�Zd	d
�Zdd�Zddd�Zdd�ZdZdd�Zdd�Zdd�Zdd�ZGdd�d�Zd dd�ZejZej Z!dS)!a�
Python 3.X compatibility tools.

While this file was originally intended for Python 2 -> 3 transition,
it is now used to create a compatibility layer between different
minor versions of Python 3.

While the active version of numpy may not support a given version of python, we
allow downstream libraries to continue to use these shims for forward
compatibility with numpy while they transition their code to newer versions of
Python.
)�bytes�asbytes�	isfileobj�getexception�strchar�unicode�	asunicode�asbytes_nested�asunicode_nested�asstr�open_latin1�long�
basestring�sixu�
integer_types�is_pathlib_path�npy_load_module�Path�pickle�contextlib_nullcontext�	os_fspath�os_PathLike�N)rcCst|t�r|�d�St|�S�N�latin1��
isinstancer�decode�str��s�r �7/usr/lib64/python3.9/site-packages/numpy/compat/py3k.pyr"s

rcCst|t�r|St|��d�Sr)rrr�encoderr r r!r's
rcCst|t�r|�d�St|�Srrrr r r!r
,s

r
cCst|tjtjtjf�S�N)r�io�FileIO�BufferedReader�BufferedWriter)�fr r r!r1sr�rcCst||dd�S)Nz
iso-8859-1)�mode�encoding)�open)�filenamer*r r r!r4srcCs|Sr#r rr r r!r7sr�UcCst��dS)N�)�sys�exc_infor r r r!r<srcCs2t|d�r&t|ttf�s&dd�|D�St|�SdS)N�__iter__cSsg|]}t|��qSr )r��.0�yr r r!�
<listcomp>A�z"asbytes_nested.<locals>.<listcomp>)�hasattrrrrr��xr r r!r?srcCs2t|d�r&t|ttf�s&dd�|D�St|�SdS)Nr2cSsg|]}t|��qSr )r	r3r r r!r6Gr7z$asunicode_nested.<locals>.<listcomp>)r8rrrrr9r r r!r	Esr	cCs
t|t�S)z�
    Check whether obj is a `pathlib.Path` object.

    Prefer using ``isinstance(obj, os.PathLike)`` instead of this function.
    )rr)�objr r r!rKsrc@s*eZdZdZd	dd�Zdd�Zdd�ZdS)
ra�Context manager that does no additional processing.

    Used as a stand-in for a normal context manager, when a particular
    block of code is only sometimes used with a normal context manager:

    cm = optional_cm if condition else nullcontext()
    with cm:
        # Perform operation, using optional_cm if condition is True

    .. note::
        Prefer using `contextlib.nullcontext` instead of this context manager.
    NcCs
||_dSr#��enter_result)�selfr=r r r!�__init__bszcontextlib_nullcontext.__init__cCs|jSr#r<)r>r r r!�	__enter__esz contextlib_nullcontext.__enter__cGsdSr#r )r>�excinfor r r!�__exit__hszcontextlib_nullcontext.__exit__)N)�__name__�
__module__�__qualname__�__doc__r?r@rBr r r r!rTs
rcCsddlm}|||���S)a�
    Load a module. Uses ``load_module`` which will be deprecated in python
    3.12. An alternative that uses ``exec_module`` is in
    numpy.distutils.misc_util.exec_mod_from_location

    .. versionadded:: 1.11.2

    Parameters
    ----------
    name : str
        Full module name.
    fn : str
        Path to module file.
    info : tuple, optional
        Only here for backward compatibility with Python 2.*.

    Returns
    -------
    mod : module

    r)�SourceFileLoader)�importlib.machineryrG�load_module)�name�fn�inforGr r r!rlsr)r))N)"rF�__all__r0�os�pathlibrr$Zpickle5r�ImportError�intrrrr
rrrrr
rrrrrrr	rrr�fspathr�PathLikerr r r r!�<module>s:
	


Zerion Mini Shell 1.0