python (3.11.7)

(root)/
lib/
python3.11/
__pycache__/
operator.cpython-311.pyc

e*dZgdZddlmZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZdZeZdZdZdZdZdZdZdZdZdZdZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%d%Z&d&Z'd@d'Z(d(Z)Gd)d*Z*Gd+d,Z+Gd-d.Z,d/Z-d0Z.d1Z/d2Z0d3Z1d4Z2d5Z3d6Z4d7Z5d8Z6d9Z7d:Z8d;Z9d<Z:	dd=l;Tdd>l;mZn#e<$rYnwxYweZ=eZ>eZ?eZ@e	ZAe
ZBeZCeZDeZEeZFe)ZGeZHeZIeZJeZKeZLeZMeZNeZOeZPeZQeZReZSeZTeZUeZVe ZWe!ZXe"ZYe$ZZe%Z[e'Z\e-Z]e.Z^e/Z_e0Z`e1Zae2Zbe3Zce4Zde5Zee6Zfe7Zge8Zhe9Zie:Zjd?S)Aas
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.
)7absaddand_
attrgettercallconcatcontainscountOfdelitemeqfloordivgegetitemgtiaddiandiconcat	ifloordivilshiftimatmulimodimulindexindexOfinvinvertioripowirshiftis_is_notisub
itemgetteritruedivixorlelength_hintlshiftltmatmulmethodcallermodmulnenegnot_or_pospowrshiftsetitemsubtruedivtruthxor)rc||kS)zSame as a < b.abs  </BuggyBox/python/3.11.7/bootstrap/lib/python3.11/operator.pyr(r(q5Lc||kS)zSame as a <= b.r;r<s  r?r%r%6MrAc||kS)zSame as a == b.r;r<s  r?rr#rCrAc||kS)zSame as a != b.r;r<s  r?r-r-'rCrAc||kS)zSame as a >= b.r;r<s  r?r
r
+rCrAc||kS)zSame as a > b.r;r<s  r?rr/r@rAc|S)zSame as not a.r;r=s r?r/r/5s	5LrAc|rdndS)z*Return True if a is true, False otherwise.TFr;rIs r?r7r79s44%rAc
||uS)zSame as a is b.r;r<s  r?rr=6MrAc
||uS)zSame as a is not b.r;r<s  r?r r AsA:rAc t|S)zSame as abs(a).)_absrIs r?rrGs
77NrAc||zS)zSame as a + b.r;r<s  r?rrKq5LrAc||zS)zSame as a & b.r;r<s  r?rrOrQrAc||zS)zSame as a // b.r;r<s  r?rrS6MrAc*|S)zSame as a.__index__().)	__index__rIs r?rrWs;;==rAc|S)zSame as ~a.r;rIs r?rr[	
2IrAc||zS)zSame as a << b.r;r<s  r?r'r'`rTrAc||zS)zSame as a % b.r;r<s  r?r+r+drQrAc||zS)zSame as a * b.r;r<s  r?r,r,hrQrAc||zS)zSame as a @ b.r;r<s  r?r)r)lrQrAc|S)zSame as -a.r;rIs r?r.r.prXrAc||zS)zSame as a | b.r;r<s  r?r0r0trQrAc|
S)zSame as +a.r;rIs r?r1r1xrXrAc||zS)zSame as a ** b.r;r<s  r?r2r2|rTrAc||z	S)zSame as a >> b.r;r<s  r?r3r3rTrAc||z
S)zSame as a - b.r;r<s  r?r5r5rQrAc||zS)zSame as a / b.r;r<s  r?r6r6rQrAc||zS)zSame as a ^ b.r;r<s  r?r8r8rQrAcxt|ds&dt|jz}t|||zS)z%Same as a + b, for a and b sequences.__getitem__!'%s' object can't be concatenatedhasattrtype__name__	TypeErrorr=r>msgs   r?rrs<1m$$1DGG4DDnnq5LrAc
||vS)z(Same as b in a (note reversed operands).r;r<s  r?rrrLrAc2d}|D]}||us||kr|dz
}|S)z=Return the number of items in a which are, or which equal, b.r9r;)r=r>countis    r?r	r	s6
E
66Q!VVQJELrAc||=dS)zSame as del a[b].Nr;r<s  r?r
r
s
	!rAc||S)z
Same as a[b].r;r<s  r?rrsQ4KrAcft|D]\}}||us||kr|cStd)z!Return the first index of b in a.z$sequence.index(x): x not in sequence)	enumerate
ValueError)r=r>rsjs    r?rrsM!AA166Q!VVHHH?@@@rAc|||<dS)zSame as a[b] = c.Nr;)r=r>cs   r?r4r4sAaDDDrAct|ts&dt|jz}t	|	t|S#t$rYnwxYw	t|j}n#t$r|cYSwxYw	||}n#t$r|cYSwxYw|tur|St|ts&dt|jz}t	||dkrd}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 %sr9z$__length_hint__() should return >= 0)

isinstanceintrjrkrllen__length_hint__AttributeErrorNotImplementedrx)objdefaultrnhintvals     r?r&r&s<gs##@G}}%&nn
3xx



Cyy(d3ii
nc38Cyy!"nn
Qww4ooJs5A
AAA22BBBB B c||i|S)zSame as obj(*args, **kwargs).r;)rargskwargss   r?rrs3rAc.eZdZdZdZdZdZdZdZdS)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_callc(|sOt|tstd|f|_|dfd}||_dS|f|z|_t
tt|jfd}||_dS)Nzattribute name must be a string.c2D]}t||}|SN)getattr)rnamenamess  r?funcz!attrgetter.__init__.<locals>.funcs(!--D!#t,,CC
rAc<tfdDS)Nc3.K|]}|VdSrr;).0getterrs  r?	<genexpr>z4attrgetter.__init__.<locals>.func.<locals>.<genexpr>s+??VVVC[[??????rAtuple)rgetterss`r?rz!attrgetter.__init__.<locals>.funcs'????w??????rA)	r}strrlrsplitrrmapr)selfattrattrsrrrs    @@r?__init__zattrgetter.__init__s	dC((
C ABBB'DKJJsOOE




DJJJ'E/DKC
DK8899G
@
@
@
@
@DJJJrAc,||Srrrrs  r?__call__zattrgetter.__call__zz#rAc
|jjd|jjddt	t
|jdSNr(, ))	__class__
__module____qualname__joinrreprrrs r?__repr__zattrgetter.__repr__sK"n777"n999"iiD$+(>(>????A	ArAc|j|jfSr)rrrs r?
__reduce__zattrgetter.__reduce__~t{**rAN	rkrr__doc__	__slots__rrrrr;rAr?rrsd$I$AAA
+++++rArc.eZdZdZdZdZdZdZdZdS)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])
    _itemsrclsf|_fd}||_dSfzx|_fd}||_dS)Nc|Srr;)ritems r?rz!itemgetter.__init__.<locals>.funcs
4y rAc<tfdDS)Nc3(K|]}|V
dSrr;)rrsrs  r?rz4itemgetter.__init__.<locals>.func.<locals>.<genexpr> s'33SV333333rAr)ritemss`r?rz!itemgetter.__init__.<locals>.funcs'3333U333333rAr)rrrrs `` r?rzitemgetter.__init__so		'DK
!
!
!
!
!DJJJ#''E/1DK%
4
4
4
4
4DJJJrAc,||Srrrs  r?rzitemgetter.__call__#rrAc
|jjd|jjddt	t
|jdSr)rrrkrrrrrs r?rzitemgetter.__repr__&sK"n777"n555"iiD$+(>(>????A	ArAc|j|jfSr)rrrs r?rzitemgetter.__reduce__+rrANrr;rAr?r"r"sd
$I


AAA
+++++rAr"c.eZdZdZdZdZdZdZdZdS)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_kwargsc||_t|jtstd||_||_dS)Nzmethod name must be a string)rr}rrlrr)rrrrs    r?rzmethodcaller.__init__7s>
$*c**	<:;;;
rAcLt||j|ji|jSr)rrrrrs  r?rzmethodcaller.__call__>s''wsDJ''Dt|DDDrAcVt|jg}|tt|j|d|jD|jjd|jj	dd
|dS)Nc3*K|]\}}|d|VdS)=Nr;)rkvs   r?rz(methodcaller.__repr__.<locals>.<genexpr>Ds1FFAqqq!!$FFFFFFrArrrr)rrextendrrrrrrrkr)rrs  r?rzmethodcaller.__repr__AsTZ  !Cdj))***FF1C1C1E1EFFFFFF"n777"n555"iioooo/	/rAc|js|j|jf|jzfSddlm}||j|jfi|j|jfS)Nr9)partial)rrrr	functoolsr)rrs  r?rzmethodcaller.__reduce__Is^|	S>DJ=4:#===))))))74>4:FFFF
RRrANrr;rAr?r*r*.si.IEEE///SSSSSrAr*c||z
}|S)zSame as a += b.r;r<s  r?rrSFAHrAc||z}|S)zSame as a &= b.r;r<s  r?rrXrrAc|t|ds&dt|jz}t|||z
}|S)z&Same as a += b, for a and b sequences.rfrgrhrms   r?rr]sA1m$$1DGG4DDnnFAHrAc||z}|S)zSame as a //= b.r;r<s  r?rre!GAHrAc||z}|S)zSame as a <<= b.r;r<s  r?rrjrrAc||z}|S)zSame as a %= b.r;r<s  r?rrorrAc||z}|S)zSame as a *= b.r;r<s  r?rrtrrAc||z}|S)zSame as a @= b.r;r<s  r?rryrrAc||z}|S)zSame as a |= b.r;r<s  r?rr~rrAc||z}|S)zSame as a **= b.r;r<s  r?rrrrAc||z}|S)zSame as a >>= b.r;r<s  r?rrrrAc||z}|S)zSame as a -= b.r;r<s  r?r!r!rrAc||z}|S)zSame as a /= b.r;r<s  r?r#r#rrAc||z}|S)zSame as a ^= b.r;r<s  r?r$r$rrA)*)rN)r9)kr__all__builtinsrrOr(r%rr-r
rr/r7rr rrrrrrr'r+r,r)r.r0r1r2r3r5r6r8rrr	r
rrr4r&rrr"r*rrrrrrrrrrrr!r#r$	_operatorImportError__lt____le____eq____ne____ge____gt____not____abs____add____and__r__floordiv__rV__inv__
__invert__
__lshift____mod____mul__
__matmul____neg____or____pos____pow__
__rshift____sub____truediv____xor__
__concat____contains____delitem__rf__setitem____iadd____iand____iconcat__
__ifloordiv____ilshift____imod____imul____imatmul____ior____ipow____irshift____isub____itruediv____ixor__r;rAr?<module>rs

888!     
   




AAA


%%%%R   %+%+%+%+%+%+%+%+N++++++++> S S S S S S S SJ









































""!!!!!!			D	
					





	













	














sCC$#C$