Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.6/site-packages/past/builtins/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/past/builtins/__pycache__/misc.cpython-36.pyc

3

�uGh��
@srddlmZddlZddlZddlZddlZddlmZmZm	Z	erRddl
mZnddlmZer�ddl
Z
ddlmZdd�ZddlmZdd	�Zd
d�ZddlmZd
d�ZeZejdkr�ddlmZnddlmZeZeZeZnVddl Z ddl
mZe jZe jZe jZe j!Z!e jZe jZe jZe jZe jZe jZe jZe�rJddd�Z!e�rjdd	ddddddddg
Z"ngZ"dS)�)�unicode_literalsN)�PY2�PY3�exec_)�MappingcOs
|||�S)N�)�f�args�kwrr�9/root/tmp/pip-build-gzoz1_uw/future/past/builtins/misc.py�applysr)�strcCstt|f��S)zU
        Return a byte-string of one character with ordinal i; 0 <= i <= 256
        )�oldstr�bytes)�irrr�chrsrc
slt�t�rt�t�rtd��y�t�tj�rftj��rft�tj�sTtdjt��d���t�t	�rbdSd
St�tj�r�tj��r�t�tj�s�tdjt��d���t�t	�r�dSdS��k��kStk
�rf��kr�dStd�tjt
tttt
fg}d}}x6t|�D]*\}}t�|��r|}t�|��r|}�qWt||�dk�r\t�t
��rlt�t��rlt�jd	���St�t
��r�t�t��r�t��jd	��St�t��r�x0t���D]"\}}t||�}	|	dk�r�|	S�q�WdSt�t
��r\t��t��k�rtt��t���St��fd
d��D��}
t��fdd��D��}|
|k�rJt|
|�St�|
�|�St||�SXdS)z�
        cmp(x, y) -> integer

        Return negative if x<y, zero if x==y, positive if x>y.
        Python2 had looser comparison allowing cmp None and non Numerical types and collections.
        Try to match the old behavior
        zcannot compare sets using cmp()z.cannot compare float("nan"), {type_y} with cmp)Ztype_y�z.cannot compare {type_x}, float("nan") with cmp)Ztype_xrN�asciic3s*|]"}|�ks�|�|kr|VqdS)Nr)�.0�a)�x�yrr�	<genexpr>Zszcmp.<locals>.<genexpr>c3s*|]"}|�ks�|�|kr|VqdS)Nr)r�b)rrrrr[s���r)�
isinstance�set�	TypeError�numbers�Number�math�isnan�format�type�int�dict�listr
r�	enumerate�cmp�decode�zip�len�min)rrZ
type_orderZx_type_indexZy_type_indexrZ
type_matchZx_elemZy_elemZelem_cmp_valZx_keyZy_keyr)rrrr(sd








r()�interncCsdtj|�dd�S)zUoct(number) -> string

        Return the octal representation of an integer
        �0�N)�builtins�oct)�numberrrrr1dsr1��)�reloadcCs�|dkr*tj�d}|dj}|dj}n|dkr6|}t|t�sHtd��t|t�sZtd��t|d��}|j�}WdQRXt	||d�}t
|||�dS)z�
        Read and execute a Python script from a file in the given namespaces.
        The globals and locals are dictionaries, defaulting to the current
        globals and locals. If only globals is given, locals defaults to it.
        Nrrzglobals must be a mappingzlocals must be a mapping�rb�exec)�inspect�stack�	f_globals�f_localsrrr�open�read�compiler)�filenameZ	myglobalsZmylocalsZcaller_frameZfin�source�coderrr�execfile�s


rBr-�	raw_inputr5�unichr�unicode�xrange)r3r4)NN)#�
__future__rr8�sysr rZfuture.utilsrrr�collectionsr�collections.abcr0rZ
past.builtinsr
rrr(r-r1�inputrC�version_info�	importlibr5�imprErD�rangerF�__builtin__rB�__all__rrrr�<module>sVC



Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists