https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/numpy/compat/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/numpy/compat/__pycache__/py3k.cpython-310.pyc
o

6��aC�@sdZgd�ZddlZddlZddlmZddlZddlZddlmZ	zddl
ZWn
ey5ddlZYnwe
Ze
fZeZeZeZdd�Zdd	�Zd
d�Zdd
�Zd dd�Zdd�ZdZdd�Zdd�Zdd�Zdd�ZGdd�d�Zd!dd�Z ej!Z"ej#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)r)�ABCcC�t|t�r
|�d�St|�S�N�latin1��
isinstancer�decode�str��s�r"�3/usr/lib/python3/dist-packages/numpy/compat/py3k.pyr&�

rcCst|t�r|St|��d�Sr)rrr�encoder r"r"r#r+s
rcCrrrr r"r"r#r
0r$r
cCst|tjtjtjf�S�N)r�io�FileIO�BufferedReader�BufferedWriter)�fr"r"r#r5sr�rcCst||dd�S)Nz
iso-8859-1)�mode�encoding)�open)�filenamer-r"r"r#r8srcCs|Sr&r"r r"r"r#r;�r�UcCst��dS)N�)�sys�exc_infor"r"r"r#r@srcC�.t|d�rt|ttf�sdd�|D�St|�S)N�__iter__cS�g|]}t|��qSr")r��.0�yr"r"r#�
<listcomp>E�z"asbytes_nested.<locals>.<listcomp>)�hasattrrrrr��xr"r"r#rC�rcCr6)Nr7cSr8r")r	r9r"r"r#r<Kr=z$asunicode_nested.<locals>.<listcomp>)r>rrrrr?r"r"r#r	IrAr	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#rOs
rc@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)�selfrDr"r"r#�__init__fs
zcontextlib_nullcontext.__init__cCs|jSr&rC)rEr"r"r#�	__enter__isz contextlib_nullcontext.__enter__cGsdSr&r")rE�excinfor"r"r#�__exit__lr1zcontextlib_nullcontext.__exit__r&)�__name__�
__module__�__qualname__�__doc__rFrGrIr"r"r"r#rXs


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.machineryrN�load_module)�name�fn�inforNr"r"r#rpsr)r,r&)%rM�__all__r4�os�pathlibrr'�abcr�abc_ABC�pickle5r�ImportError�intrrrr
rrrrr
rrrrrrr	rrr�fspathr�PathLikerr"r"r"r#�<module>sB�
	



https://t.me/RX1948 - 2025