ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python34/lib64/python3.4/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python34/lib64/python3.4/__pycache__/operator.cpython-34.pyc

�
h f�#�4@ssdZddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4g4Zd5d6lmZd7d%�Zd8d"�Zd9d	�Zd:d)�Zd;d�Z	d<d
�Z
d=d+�Zd>d3�Zd?d�Z
d@d�ZdAd�ZdBd�ZdCd�ZdDd
�ZdEd�ZdFd�ZeZdGd$�ZdHd'�ZdId(�ZdJd*�ZdKd,�ZdLd-�ZdMd.�ZdNd/�ZdOd1�ZdPd2�ZdQd4�ZdRd�Z dSd�Z!dTd�Z"dUd�Z#dVd�Z$dWd�Z%dXd0�Z&d5dYd#�Z'GdZd�d�Z(Gd[d�d�Z)Gd\d&�d&�Z*d]d�Z+d^d�Z,d_d�Z-d`d�Z.dad�Z/dbd�Z0dcd�Z1ddd�Z2ded�Z3dfd�Z4dgd�Z5dhd �Z6did!�Z7yd5djl8TWne9k
r\YnXd5dkl8mZeZ:eZ;eZ<eZ=e	Z>e
Z?eZ@eZAeZBeZCeZDeZEeZFeZGeZHeZIeZJeZKeZLeZMeZNeZOeZPeZQeZRe ZSe!ZTe#ZUe$ZVe&ZWe+ZXe,ZYe-ZZe.Z[e/Z\e0Z]e1Z^e2Z_e3Z`e4Zae5Zbe6Zce7ZddlS)mas
Operator Interface

This module exports a set of functions corresponding to the intrinsic
operators of Python.  For example, operator.add(x, y) is equivalent
to the expression x+y.  The function names are those used for special
methods; variants without leading and trailing '__' are also provided
for convenience.

This is the pure Python implementation of the module.
�abs�add�and_�
attrgetter�concat�contains�countOf�delitem�eq�floordiv�ge�getitem�gt�iadd�iand�iconcat�	ifloordiv�ilshift�imod�imul�index�indexOf�inv�invert�ior�ipow�irshift�is_�is_not�isub�
itemgetter�itruediv�ixor�le�length_hint�lshift�lt�methodcaller�mod�mul�ne�neg�not_�or_�pos�pow�rshift�setitem�sub�truediv�truth�xor�)rcCs
||kS)zSame as a < b.�)�a�br6r6�-/opt/alt/python34/lib64/python3.4/operator.pyr%scCs
||kS)zSame as a <= b.r6)r7r8r6r6r9r"scCs
||kS)zSame as a == b.r6)r7r8r6r6r9r	#scCs
||kS)zSame as a != b.r6)r7r8r6r6r9r)'scCs
||kS)zSame as a >= b.r6)r7r8r6r6r9r+scCs
||kS)zSame as a > b.r6)r7r8r6r6r9r
/scCs|S)zSame as not a.r6)r7r6r6r9r+5scCs|r
dSdS)z*Return True if a is true, False otherwise.TFr6)r7r6r6r9r39scCs
||kS)zSame as a is b.r6)r7r8r6r6r9r=scCs
||k	S)zSame as a is not b.r6)r7r8r6r6r9rAscCs
t|�S)zSame as abs(a).)�_abs)r7r6r6r9rGscCs||S)zSame as a + b.r6)r7r8r6r6r9rKscCs||@S)zSame as a & b.r6)r7r8r6r6r9rOscCs||S)zSame as a // b.r6)r7r8r6r6r9r
SscCs
|j�S)zSame as a.__index__().)�	__index__)r7r6r6r9rWscCs|S)zSame as ~a.r6)r7r6r6r9r[scCs||>S)zSame as a << b.r6)r7r8r6r6r9r$`scCs||S)zSame as a % b.r6)r7r8r6r6r9r'dscCs||S)zSame as a * b.r6)r7r8r6r6r9r(hscCs|S)zSame as -a.r6)r7r6r6r9r*lscCs||BS)zSame as a | b.r6)r7r8r6r6r9r,pscCs|
S)zSame as +a.r6)r7r6r6r9r-tscCs||S)zSame as a ** b.r6)r7r8r6r6r9r.xscCs||?S)zSame as a >> b.r6)r7r8r6r6r9r/|scCs||S)zSame as a - b.r6)r7r8r6r6r9r1�scCs||S)zSame as a / b.r6)r7r8r6r6r9r2�scCs||AS)zSame as a ^ b.r6)r7r8r6r6r9r4�scCs9t|d�s1dt|�j}t|��n||S)z%Same as a + b, for a and b sequences.�__getitem__z!'%s' object can't be concatenated)�hasattr�type�__name__�	TypeError)r7r8�msgr6r6r9r�scCs
||kS)z(Same as b in a (note reversed operands).r6)r7r8r6r6r9r�scCs4d}x'|D]}||kr
|d7}q
q
W|S)z)Return the number of times b occurs in a.r5�r6)r7r8�count�ir6r6r9r�s

cCs||=dS)zSame as del a[b].Nr6)r7r8r6r6r9r�scCs||S)z
Same as a[b].r6)r7r8r6r6r9r�scCs=x6t|�D]\}}||kr
|Sq
Wtd��dS)z!Return the first index of b in a.z$sequence.index(x): x not in sequenceN)�	enumerate�
ValueError)r7r8rD�jr6r6r9r�scCs|||<dS)zSame as a[b] = c.Nr6)r7r8�cr6r6r9r0�scCst|t�s1dt|�j}t|��nyt|�SWntk
rSYnXyt|�j}Wntk
r|SYnXy||�}Wntk
r�|SYnX|tkr�|St|t�s�dt|�j}t|��n|dkrd}t	|��n|S)a2
    Return an estimate of the number of items in obj.
    This is useful for presizing containers when building from an iterable.

    If the object supports len(), the result will be exact. Otherwise, it may
    over- or under-estimate by an arbitrary amount. The result will be an
    integer >= 0.
    z/'%s' object cannot be interpreted as an integerz'__length_hint__ must be integer, not %sr5z$__length_hint__() should return >= 0)
�
isinstance�intr>r?r@�len�__length_hint__�AttributeError�NotImplementedrF)�obj�defaultrAZhint�valr6r6r9r#�s4	

	
	c@s.eZdZdZdd�Zdd�ZdS)raV
    Return a callable object that fetches the given attribute(s) from its operand.
    After f = attrgetter('name'), the call f(r) returns r.name.
    After g = attrgetter('name', 'date'), the call g(r) returns (r.name, r.date).
    After h = attrgetter('name.first', 'name.last'), the call h(r) returns
    (r.name.first, r.name.last).
    cs�|sQt|t�s$td��n|jd���fdd�}||_n7ttt|f|����fdd�}||_dS)Nzattribute name must be a string�.cs$x�D]}t||�}qW|S)N)�getattr)rO�name)�namesr6r9�func�s
z!attrgetter.__init__.<locals>.funccst�fdd��D��S)Nc3s|]}|��VqdS)Nr6)�.0�getter)rOr6r9�	<genexpr>�sz4attrgetter.__init__.<locals>.func.<locals>.<genexpr>)�tuple)rO)�getters)rOr9rV�s)rI�strr@�split�_callrZ�mapr)�self�attr�attrsrVr6)r[rUr9�__init__�szattrgetter.__init__cCs
|j|�S)N)r^)r`rOr6r6r9�__call__�szattrgetter.__call__N)r?�
__module__�__qualname__�__doc__rcrdr6r6r6r9r�sc@s.eZdZdZdd�Zdd�ZdS)rz�
    Return a callable object that fetches the given item(s) from its operand.
    After f = itemgetter(2), the call f(r) returns r[2].
    After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])
    csP�s$�fdd�}||_n(�f���fdd�}||_dS)Ncs|�S)Nr6)rO)�itemr6r9rVsz!itemgetter.__init__.<locals>.funccst�fdd��D��S)Nc3s|]}�|VqdS)Nr6)rWrD)rOr6r9rYsz4itemgetter.__init__.<locals>.func.<locals>.<genexpr>)rZ)rO)�items)rOr9rVs)r^)r`rhrirVr6)rhrir9rc�s
zitemgetter.__init__cCs
|j|�S)N)r^)r`rOr6r6r9rd
szitemgetter.__call__N)r?rerfrgrcrdr6r6r6r9r�sc@s.eZdZdZdd�Zdd�ZdS)r&z�
    Return a callable object that calls the given method on its operand.
    After f = methodcaller('name'), the call f(r) returns r.name().
    After g = methodcaller('name', 'date', foo=1), the call g(r) returns
    r.name('date', foo=1).
    cOs^t|�dkr'd}t|��n|d}|d|_|dd�|_||_dS)N�z9methodcaller needs at least one argument, the method namer5rB)rKr@�_name�_args�_kwargs)�args�kwargsrAr`r6r6r9rcs

zmethodcaller.__init__cCst||j�|j|j�S)N)rSrkrlrm)r`rOr6r6r9rdszmethodcaller.__call__N)r?rerfrgrcrdr6r6r6r9r&
s	cCs||7}|S)zSame as a += b.r6)r7r8r6r6r9r#s
cCs||M}|S)zSame as a &= b.r6)r7r8r6r6r9r(s
cCs?t|d�s1dt|�j}t|��n||7}|S)z&Same as a += b, for a and b sequences.r<z!'%s' object can't be concatenated)r=r>r?r@)r7r8rAr6r6r9r-s

cCs||}|S)zSame as a //= b.r6)r7r8r6r6r9r5s
cCs||K}|S)zSame as a <<= b.r6)r7r8r6r6r9r:s
cCs||;}|S)zSame as a %= b.r6)r7r8r6r6r9r?s
cCs||9}|S)zSame as a *= b.r6)r7r8r6r6r9rDs
cCs||O}|S)zSame as a |= b.r6)r7r8r6r6r9rIs
cCs||C}|S)zSame as a **= b.r6)r7r8r6r6r9rNs
cCs||L}|S)zSame as a >>= b.r6)r7r8r6r6r9rSs
cCs||8}|S)zSame as a -= b.r6)r7r8r6r6r9rXs
cCs||}|S)zSame as a /= b.r6)r7r8r6r6r9r ]s
cCs||N}|S)zSame as a ^= b.r6)r7r8r6r6r9r!bs
)�*)rgN)erg�__all__�builtinsrr:r%r"r	r)rr
r+r3rrrrr
rrrr$r'r(r*r,r-r.r/r1r2r4rrrrrrr0r#rrr&rrrrrrrrrrrr r!�	_operator�ImportError�__lt__�__le__�__eq__�__ne__�__ge__�__gt__�__not__�__abs__�__add__�__and__�__floordiv__r;�__inv__�
__invert__�
__lshift__�__mod__�__mul__�__neg__�__or__�__pos__�__pow__�
__rshift__�__sub__�__truediv__�__xor__�
__concat__�__contains__�__delitem__r<�__setitem__�__iadd__�__iand__�__iconcat__�
__ifloordiv__�__ilshift__�__imod__�__imul__�__ior__�__ipow__�__irshift__�__isub__�__itruediv__�__ixor__r6r6r6r9�<module>s�)


Zerion Mini Shell 1.0