operator API Reference
Full documentation for operator (Standard Library / Native)
operator.abs
Python Library Documentation: built-in function abs in module _operator
abs(a, /)
Same as abs(a).
operator.add
Python Library Documentation: built-in function add in module _operator
add(a, b, /)
Same as a + b.
operator.and_
Python Library Documentation: built-in function and_ in module _operator
and_(a, b, /)
Same as a & b.
operator.attrgetter
Python Library Documentation: class attrgetter in module operator
class attrgetter(builtins.object)
| attrgetter(attr, /, *attrs)
|
| 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).
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Return state information for pickling
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __vectorcalloffset__
operator.call
Python Library Documentation: built-in function call in module _operator
call(obj, /, *args, **kwargs)
Same as obj(*args, **kwargs).
operator.concat
Python Library Documentation: built-in function concat in module _operator
concat(a, b, /)
Same as a + b, for a and b sequences.
operator.contains
Python Library Documentation: built-in function contains in module _operator
contains(a, b, /)
Same as b in a (note reversed operands).
operator.countOf
Python Library Documentation: built-in function countOf in module _operator
countOf(a, b, /)
Return the number of items in a which are, or which equal, b.
operator.delitem
Python Library Documentation: built-in function delitem in module _operator
delitem(a, b, /)
Same as del a[b].
operator.eq
Python Library Documentation: built-in function eq in module _operator
eq(a, b, /)
Same as a == b.
operator.floordiv
Python Library Documentation: built-in function floordiv in module _operator
floordiv(a, b, /)
Same as a // b.
operator.ge
Python Library Documentation: built-in function ge in module _operator
ge(a, b, /)
Same as a >= b.
operator.getitem
Python Library Documentation: built-in function getitem in module _operator
getitem(a, b, /)
Same as a[b].
operator.gt
Python Library Documentation: built-in function gt in module _operator
gt(a, b, /)
Same as a > b.
operator.iadd
Python Library Documentation: built-in function iadd in module _operator
iadd(a, b, /)
Same as a += b.
operator.iand
Python Library Documentation: built-in function iand in module _operator
iand(a, b, /)
Same as a &= b.
operator.iconcat
Python Library Documentation: built-in function iconcat in module _operator
iconcat(a, b, /)
Same as a += b, for a and b sequences.
operator.ifloordiv
Python Library Documentation: built-in function ifloordiv in module _operator
ifloordiv(a, b, /)
Same as a //= b.
operator.ilshift
Python Library Documentation: built-in function ilshift in module _operator
ilshift(a, b, /)
Same as a <<= b.
operator.imatmul
Python Library Documentation: built-in function imatmul in module _operator
imatmul(a, b, /)
Same as a @= b.
operator.imod
Python Library Documentation: built-in function imod in module _operator
imod(a, b, /)
Same as a %= b.
operator.imul
Python Library Documentation: built-in function imul in module _operator
imul(a, b, /)
Same as a *= b.
operator.index
Python Library Documentation: built-in function index in module _operator
index(a, /)
Same as a.__index__()
operator.indexOf
Python Library Documentation: built-in function indexOf in module _operator
indexOf(a, b, /)
Return the first index of b in a.
operator.inv
Python Library Documentation: built-in function inv in module _operator
inv(a, /)
Same as ~a.
operator.invert
Python Library Documentation: built-in function invert in module _operator
invert(a, /)
Same as ~a.
operator.ior
Python Library Documentation: built-in function ior in module _operator
ior(a, b, /)
Same as a |= b.
operator.ipow
Python Library Documentation: built-in function ipow in module _operator
ipow(a, b, /)
Same as a **= b.
operator.irshift
Python Library Documentation: built-in function irshift in module _operator
irshift(a, b, /)
Same as a >>= b.
operator.is_
Python Library Documentation: built-in function is_ in module _operator
is_(a, b, /)
Same as a is b.
operator.is_not
Python Library Documentation: built-in function is_not in module _operator
is_not(a, b, /)
Same as a is not b.
operator.isub
Python Library Documentation: built-in function isub in module _operator
isub(a, b, /)
Same as a -= b.
operator.itemgetter
Python Library Documentation: class itemgetter in module operator class itemgetter(builtins.object) | itemgetter(item, /, *items) | | 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]) | | Methods defined here: | | __call__(self, /, *args, **kwargs) | Call self as a function. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Return state information for pickling | | __repr__(self, /) | Return repr(self). | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __vectorcalloffset__
operator.itruediv
Python Library Documentation: built-in function itruediv in module _operator
itruediv(a, b, /)
Same as a /= b.
operator.ixor
Python Library Documentation: built-in function ixor in module _operator
ixor(a, b, /)
Same as a ^= b.
operator.le
Python Library Documentation: built-in function le in module _operator
le(a, b, /)
Same as a <= b.
operator.length_hint
Python Library Documentation: built-in function length_hint in module _operator
length_hint(obj, default=0, /)
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.
operator.lshift
Python Library Documentation: built-in function lshift in module _operator
lshift(a, b, /)
Same as a << b.
operator.lt
Python Library Documentation: built-in function lt in module _operator
lt(a, b, /)
Same as a < b.
operator.matmul
Python Library Documentation: built-in function matmul in module _operator
matmul(a, b, /)
Same as a @ b.
operator.methodcaller
Python Library Documentation: class methodcaller in module operator
class methodcaller(builtins.object)
| methodcaller(name, /, *args, **kwargs)
|
| 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).
|
| Methods defined here:
|
| __call__(self, /, *args, **kwargs)
| Call self as a function.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Return state information for pickling
|
| __repr__(self, /)
| Return repr(self).
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
operator.mod
Python Library Documentation: built-in function mod in module _operator
mod(a, b, /)
Same as a % b.
operator.mul
Python Library Documentation: built-in function mul in module _operator
mul(a, b, /)
Same as a * b.
operator.ne
Python Library Documentation: built-in function ne in module _operator
ne(a, b, /)
Same as a != b.
operator.neg
Python Library Documentation: built-in function neg in module _operator
neg(a, /)
Same as -a.
operator.not_
Python Library Documentation: built-in function not_ in module _operator
not_(a, /)
Same as not a.
operator.or_
Python Library Documentation: built-in function or_ in module _operator
or_(a, b, /)
Same as a | b.
operator.pos
Python Library Documentation: built-in function pos in module _operator
pos(a, /)
Same as +a.
operator.pow
Python Library Documentation: built-in function pow in module _operator
pow(a, b, /)
Same as a ** b.
operator.rshift
Python Library Documentation: built-in function rshift in module _operator
rshift(a, b, /)
Same as a >> b.
operator.setitem
Python Library Documentation: built-in function setitem in module _operator
setitem(a, b, c, /)
Same as a[b] = c.
operator.sub
Python Library Documentation: built-in function sub in module _operator
sub(a, b, /)
Same as a - b.
operator.truediv
Python Library Documentation: built-in function truediv in module _operator
truediv(a, b, /)
Same as a / b.
operator.truth
Python Library Documentation: built-in function truth in module _operator
truth(a, /)
Return True if a is true, False otherwise.
operator.xor
Python Library Documentation: built-in function xor in module _operator
xor(a, b, /)
Same as a ^ b.