ruạṛ
3 AL�i� � @ sr d dl mZ d dlZd dlZd dlZd dlZd dlmZmZm Z erRd dl mZ nd dlmZ er�d dl Z d dlmZ dd� Zd dlmZ dd � Zd d� Zd dlmZ d d� ZeZejdkr�d dlmZ nd dlmZ eZeZeZnVd dl Z d dl mZ e jZe jZe jZe j!Z!e jZe jZe jZe jZe jZe jZe jZe�rJddd�Z!e�rjdd ddddddddg Z"ng Z"dS )� )�unicode_literalsN)�PY2�PY3�exec_)�Mappingc O s | ||�S )N� )�f�args�kwr r �9/root/tmp/pip-build-3x0y2zol/future/past/builtins/misc.py�apply s r )�strc C s t t| f��S )zU Return a byte-string of one character with ordinal i; 0 <= i <= 256 )�oldstr�bytes)�ir r r �chr s r c sl t � t�rt �t�rtd��y�t � tj�rftj� �rft �tj�sTtdjt��d���t �t �rbdS d S t �tj�r�tj��r�t � tj�s�tdjt� �d���t � t �r�dS dS � �k� �k S tk �rf � �kr�dS td�tjt tttt fg}d }}x6t|�D ]*\}}t � |��r|}t �|��r|}�qW t||�dk�r\t � t ��rlt �t��rlt� jd ���S t �t ��r�t � t��r�t� �jd ��S t � t��r�x0t� ��D ]"\}}t||�} | dk�r�| S �q�W dS t � t ��r\t� �t��k�rtt� �t���S t� �fd d�� D ��} t� �fdd��D ��}| |k�rJt| |�S t� | �| �S t||�S X dS )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_xr N�asciic 3 s* | ]"}|�ks� | �| kr|V qd S )Nr )�.0�a)�x�yr r � <genexpr>Z s zcmp.<locals>.<genexpr>c 3 s* | ]"}|� ks� | �| kr|V qd S )Nr )r �b)r r r r r [ s ���r )� isinstance�set� TypeError�numbers�Number�math�isnan�format�type�int�dict�listr r � enumerate�cmp�decode�zip�len�min)r r Z type_orderZx_type_indexZy_type_indexr Z type_matchZx_elemZy_elemZelem_cmp_valZx_keyZy_keyr )r r r r( sd r( )�internc C s dt j| �dd� S )zUoct(number) -> string Return the octal representation of an integer �0� N)�builtins�oct)�numberr r r r1 d s r1 � � )�reloadc C s� |dkr*t j� d }|d j}|d j}n|dkr6|}t|t�sHtd��t|t�sZtd��t| d��}|j� }W dQ R X t || 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. Nr r zglobals must be a mappingzlocals must be a mapping�rb�exec)�inspect�stack� f_globals�f_localsr r r �open�read�compiler )�filenameZ myglobalsZmylocalsZcaller_frameZfin�source�coder r r �execfile� s rB r- � raw_inputr5 �unichr�unicode�xrange)r3 r4 )NN)#� __future__r r8 �sysr r Zfuture.utilsr r r �collectionsr �collections.abcr0 r Z past.builtinsr r r r( r- r1 �inputrC �version_info� importlibr5 �imprE rD �rangerF �__builtin__rB �__all__r r r r �<module> sV C
cải xoăn