AlkantarClanX12

Your IP : 18.225.254.81


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/operator.cpython-310.opt-1.pyc

o

6��f�)�@s�dZgd�ZddlmZdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�ZeZd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Z d<d=�Z!d>d?�Z"d@dA�Z#dBdC�Z$dDdE�Z%dFdG�Z&dHdI�Z'dqdJdK�Z(GdLdM�dM�Z)GdNdO�dO�Z*GdPdQ�dQ�Z+dRdS�Z,dTdU�Z-dVdW�Z.dXdY�Z/dZd[�Z0d\d]�Z1d^d_�Z2d`da�Z3dbdc�Z4ddde�Z5dfdg�Z6dhdi�Z7djdk�Z8dldm�Z9zddnl:TWn	e;y�Ynwddol:mZeZ<eZ=eZ>eZ?e	Z@e
ZAeZBeZCeZDeZEeZFeZGeZHeZIeZJeZKeZLeZMeZNeZOeZPeZQeZReZSeZTe ZUe!ZVe"ZWe$ZXe%ZYe'ZZe,Z[e-Z\e.Z]e/Z^e0Z_e1Z`e2Zae3Zbe4Zce5Zde6Zee7Zfe8Zge9ZhdpS)ras
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.
)6�abs�add�and_�
attrgetter�concat�contains�countOf�delitem�eq�floordiv�ge�getitem�gt�iadd�iand�iconcat�	ifloordiv�ilshift�imatmul�imod�imul�index�indexOf�inv�invert�ior�ipow�irshift�is_�is_not�isub�
itemgetter�itruediv�ixor�le�length_hint�lshift�lt�matmul�methodcaller�mod�mul�ne�neg�not_�or_�pos�pow�rshift�setitem�sub�truediv�truth�xor�)rcCs||kS)zSame as a < b.���a�br8r8�//opt/alt/python310/lib64/python3.10/operator.pyr&�r&cCs||kS)zSame as a <= b.r8r9r8r8r<r#r=r#cCs||kS)zSame as a == b.r8r9r8r8r<r	#r=r	cCs||kS)zSame as a != b.r8r9r8r8r<r+'r=r+cCs||kS)zSame as a >= b.r8r9r8r8r<r+r=rcCs||kS)zSame as a > b.r8r9r8r8r<r
/r=r
cCs|S)zSame as not a.r8�r:r8r8r<r-5�r-cCs|rdSdS)z*Return True if a is true, False otherwise.TFr8r>r8r8r<r59�r5cCs||uS)zSame as a is b.r8r9r8r8r<r=r=rcCs||uS)zSame as a is not b.r8r9r8r8r<rAr=rcCst|�S)zSame as abs(a).)�_absr>r8r8r<rGr=rcCs||S)zSame as a + b.r8r9r8r8r<rKr=rcCs||@S)zSame as a & b.r8r9r8r8r<rOr=rcCs||S)zSame as a // b.r8r9r8r8r<r
Sr=r
cCs|��S)zSame as a.__index__().)�	__index__r>r8r8r<rWr=rcCs|S)zSame as ~a.r8r>r8r8r<r[r?rcCs||>S)zSame as a << b.r8r9r8r8r<r%`r=r%cCs||S)zSame as a % b.r8r9r8r8r<r)dr=r)cCs||S)zSame as a * b.r8r9r8r8r<r*hr=r*cCs||S)zSame as a @ b.r8r9r8r8r<r'lr=r'cCs|S)zSame as -a.r8r>r8r8r<r,pr?r,cCs||BS)zSame as a | b.r8r9r8r8r<r.tr=r.cCs|
S)zSame as +a.r8r>r8r8r<r/xr?r/cCs||S)zSame as a ** b.r8r9r8r8r<r0|r=r0cCs||?S)zSame as a >> b.r8r9r8r8r<r1�r=r1cCs||S)zSame as a - b.r8r9r8r8r<r3�r=r3cCs||S)zSame as a / b.r8r9r8r8r<r4�r=r4cCs||AS)zSame as a ^ b.r8r9r8r8r<r6�r=r6cCs(t|d�sdt|�j}t|��||S)z%Same as a + b, for a and b sequences.�__getitem__�!'%s' object can't be concatenated��hasattr�type�__name__�	TypeError�r:r;�msgr8r8r<r�s
rcCs||vS)z(Same as b in a (note reversed operands).r8r9r8r8r<r�r=rcCs*d}|D]}||us||kr|d7}q|S)z=Return the number of items in a which are, or which equal, b.r7�r8)r:r;�count�ir8r8r<r�s�rcCs
||=dS)zSame as del a[b].Nr8r9r8r8r<r�s
rcCs||S)z
Same as a[b].r8r9r8r8r<r�r=rcCs2t|�D]\}}||us||kr|Sqtd��)z!Return the first index of b in a.z$sequence.index(x): x not in sequence)�	enumerate�
ValueError)r:r;rN�jr8r8r<r�s
�rcCs|||<dS)zSame as a[b] = c.Nr8)r:r;�cr8r8r<r2�r@r2cCs�t|t�sdt|�j}t|��zt|�WStyYnwzt|�j}Wnty1|YSwz||�}WntyC|YSw|turJ|St|t�sZdt|�j}t|��|dkrdd}t	|��|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 %sr7z$__length_hint__() should return >= 0)
�
isinstance�intrGrHrI�len�__length_hint__�AttributeError�NotImplementedrP)�obj�defaultrKZhint�valr8r8r<r$�s>
	�
���
�r$c@�4eZdZdZdZdd�Zdd�Zdd�Zd	d
�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).
    )�_attrs�_callcsp|st|t�std��|f|_|�d���fdd�}||_dS|f||_ttt|j����fdd�}||_dS)Nzattribute name must be a string�.cs�D]}t||�}q|S�N)�getattr)rY�name)�namesr8r<�func�sz!attrgetter.__init__.<locals>.funcc�t�fdd��D��S)Nc3s�|]}|��VqdSr`r8)�.0�getter�rYr8r<�	<genexpr>���z4attrgetter.__init__.<locals>.func.<locals>.<genexpr>��tuplerh)�gettersrhr<rd��)	rS�strrIr]�splitr^rl�mapr)�self�attrZattrsrdr8)rmrcr<�__init__�s



zattrgetter.__init__cC�
|�|�Sr`�r^�rrrYr8r8r<�__call__��
zattrgetter.__call__cC�$d|jj|jjd�tt|j��fS�N�	%s.%s(%s)�, )�	__class__�
__module__�__qualname__�joinrq�reprr]�rrr8r8r<�__repr__��zattrgetter.__repr__cC�|j|jfSr`)r~r]r�r8r8r<�
__reduce__�zattrgetter.__reduce__N�	rHrr��__doc__�	__slots__rtrxr�r�r8r8r8r<r�src@r\)r z�
    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])
    ��_itemsr^csH�s�f|_�fdd�}||_dS�f�|_��fdd�}||_dS)Ncs|�Sr`r8rh)�itemr8r<rdsz!itemgetter.__init__.<locals>.funccre)Nc3s�|]}�|VqdSr`r8)rfrNrhr8r<rirjz4itemgetter.__init__.<locals>.func.<locals>.<genexpr>rkrh)�itemsrhr<rdrnr�)rrr�r�rdr8)r�r�r<rts

zitemgetter.__init__cCrur`rvrwr8r8r<rxryzitemgetter.__call__cCrzr{)r~rrHr�rqr�r�r�r8r8r<r� r�zitemgetter.__repr__cCr�r`)r~r�r�r8r8r<r�%r�zitemgetter.__reduce__Nr�r8r8r8r<r 	sr c@r\)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).
    )�_name�_args�_kwargscOs*||_t|jt�s
td��||_||_dS)Nzmethod name must be a string)r�rSrorIr�r�)rrrb�args�kwargsr8r8r<rt1s

zmethodcaller.__init__cCst||j�|ji|j��Sr`)rar�r�r�rwr8r8r<rx8szmethodcaller.__call__cCsTt|j�g}|�tt|j��|�dd�|j��D��d|jj|jj	d�
|�fS)Ncss �|]\}}d||fVqdS)z%s=%rNr8)rf�k�vr8r8r<ri>s�z(methodcaller.__repr__.<locals>.<genexpr>r|r})r�r��extendrqr�r�r�r~rrHr�)rrr�r8r8r<r�;s�zmethodcaller.__repr__cCsD|js
|j|jf|jfSddlm}||j|jfi|j��|jfS)Nr7)�partial)r�r~r�r��	functoolsr�)rrr�r8r8r<r�Cszmethodcaller.__reduce__Nr�r8r8r8r<r((sr(cCs||7}|S)zSame as a += b.r8r9r8r8r<rM�rcCs||M}|S)zSame as a &= b.r8r9r8r8r<rRr�rcCs,t|d�sdt|�j}t|��||7}|S)z&Same as a += b, for a and b sequences.rCrDrErJr8r8r<rWs

rcCs||}|S)zSame as a //= b.r8r9r8r8r<r_r�rcCs||K}|S)zSame as a <<= b.r8r9r8r8r<rdr�rcCs||;}|S)zSame as a %= b.r8r9r8r8r<rir�rcCs||9}|S)zSame as a *= b.r8r9r8r8r<rnr�rcCs||}|S)zSame as a @= b.r8r9r8r8r<rsr�rcCs||O}|S)zSame as a |= b.r8r9r8r8r<rxr�rcCs||C}|S)zSame as a **= b.r8r9r8r8r<r}r�rcCs||L}|S)zSame as a >>= b.r8r9r8r8r<r�r�rcCs||8}|S)zSame as a -= b.r8r9r8r8r<r�r�rcCs||}|S)zSame as a /= b.r8r9r8r8r<r!�r�r!cCs||N}|S)zSame as a ^= b.r8r9r8r8r<r"�r�r")�*)r�N)r7)ir��__all__�builtinsrrAr&r#r	r+rr
r-r5rrrrr
rrrr%r)r*r'r,r.r/r0r1r3r4r6rrrrrrr2r$rr r(rrrrrrrrrrrrr!r"�	_operator�ImportError�__lt__�__le__�__eq__�__ne__�__ge__�__gt__�__not__�__abs__�__add__�__and__�__floordiv__rB�__inv__�
__invert__�
__lshift__�__mod__�__mul__�
__matmul__�__neg__�__or__�__pos__�__pow__�
__rshift__�__sub__�__truediv__�__xor__�
__concat__�__contains__�__delitem__rC�__setitem__�__iadd__�__iand__�__iconcat__�
__ifloordiv__�__ilshift__�__imod__�__imul__�__imatmul__�__ior__�__ipow__�__irshift__�__isub__�__itruediv__�__ixor__r8r8r8r<�<module>s�	
)'%�