????

Your IP : 18.220.124.7


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

3

�c��@sxddlmZddlZddlZddlZddlmZmZmZerJddl	m
Z
nddlm
Z
er�ddlZddlm
Z
dd�Z
ddlmZdd	�Zd
d�ZddlmZd
d�ZeZyddlmZWn ek
r�ddlmZYnXeZeZeZnVddl Z ddl	m
Z
e j
Z
e jZe jZe j!Z!e jZe jZe jZe jZe jZe jZe jZe�rPddd�Z!e�rpdd	ddddddddg
Z"ngZ"dS)�)�unicode_literalsN)�PY2�PY3�exec_)�MappingcOs
|||�S)N�)�f�args�kwrr�/usr/lib/python3.6/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>Xszcmp.<locals>.<genexpr>c3s*|]"}|�ks�|�|kr|VqdS)Nr)r�b)rrrrrYs���r)�
isinstance�set�	TypeError�numbers�Number�mathZisnan�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)Znumberrrrr0bsr0)�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


r>r,�	raw_inputr1�unichr�unicode�xrange)NN)#Z
__future__rr4r rZfuture.utilsrrr�collectionsr�collections.abcr/rZ
past.builtinsr
rrr'�sysr,r0�inputr?�	importlibr1�ImportErrorZimprAr@�rangerBZ__builtin__r>�__all__rrrr�<module>sVC