Trees Indices Help
Python Standard Library
Module operator
[]

Module operator

Operator interface.

This module exports a set of functions implemented in C 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 class methods; variants without leading and trailing '__' are also provided for convenience.

Classes [hide private]
attrgetter
attrgetter(attr, ...) --> attrgetter object itemgetter
itemgetter(item, ...) --> itemgetter object
Functions [hide private]
__abs__(a)
Same as abs(a).
__add__(a, b)
Same as a + b.
__and__(a, b)
Same as a & b.
__concat__(a, b)
Same as a + b, for a and b sequences.
__contains__(a, b)
Same as b in a (note reversed operands).
__delitem__(a, b)
Same as del a[b].
__delslice__(a, b, c)
Same as del a[b:c].
__div__(a, b)
Same as a / b when __future__.division is not in effect.
__eq__(a, b)
Same as a==b.
__floordiv__(a, b)
Same as a // b.
__ge__(a, b)
Same as a>=b.
__getitem__(a, b)
Same as a[b].
__getslice__(a, b, c)
Same as a[b:c].
__gt__(a, b)
Same as a>b.
__iadd__(a, b)
Same as a += b.
__iand__(a, b)
Same as a &= b.
__iconcat__(a, b)
Same as a += b, for a and b sequences.
__idiv__(a, b)
Same as a /= b when __future__.division is not in effect.
__ifloordiv__(a, b)
Same as a //= b.
__ilshift__(a, b)
Same as a <<= b.
__imod__(a, b)
Same as a %= b.
__imul__(a, b)
Same as a *= b.
__index__(a)
Same as a.__index__()
__inv__(a)
Same as ~a.
__invert__(a)
Same as ~a.
__ior__(a, b)
Same as a |= b.
__ipow__(a, b)
Same as a **= b.
__irepeat__(a, b)
Same as a *= b, where a is a sequence, and b is an integer.
__irshift__(a, b)
Same as a >>= b.
__isub__(a, b)
Same as a -= b.
__itruediv__(a, b)
Same as a /= b when __future__.division is in effect.
__ixor__(a, b)
Same as a ^= b.
__le__(a, b)
Same as a<=b.
__lshift__(a, b)
Same as a << b.
__lt__(a, b)
Same as a<b.
__mod__(a, b)
Same as a % b.
__mul__(a, b)
Same as a * b.
__ne__(a, b)
Same as a!=b.
__neg__(a)
Same as -a.
__not__(a)
Same as not a.
__or__(a, b)
Same as a | b.
__pos__(a)
Same as +a.
__pow__(a, b)
Same as a ** b.
__repeat__(a, b)
Return a * b, where a is a sequence, and b is an integer.
__rshift__(a, b)
Same as a >> b.
__setitem__(a, b, c)
Same as a[b] = c.
__setslice__(a, b, c, d)
Same as a[b:c] = d.
__sub__(a, b)
Same as a - b.
__truediv__(a, b)
Same as a / b when __future__.division is in effect.
__xor__(a, b)
Same as a ^ b.
abs(a)
Same as abs(a).
add(a, b)
Same as a + b.
and_(a, b)
Same as a & b.
concat(a, b)
Same as a + b, for a and b sequences.
contains(a, b)
Same as b in a (note reversed operands).
countOf(a, b)
Return the number of times b occurs in a.
delitem(a, b)
Same as del a[b].
delslice(a, b, c)
Same as del a[b:c].
div(a, b)
Same as a / b when __future__.division is not in effect.
eq(a, b)
Same as a==b.
floordiv(a, b)
Same as a // b.
ge(a, b)
Same as a>=b.
getitem(a, b)
Same as a[b].
getslice(a, b, c)
Same as a[b:c].
gt(a, b)
Same as a>b.
iadd(a, b)
Same as a += b.
iand(a, b)
Same as a &= b.
iconcat(a, b)
Same as a += b, for a and b sequences.
idiv(a, b)
Same as a /= b when __future__.division is not in effect.
ifloordiv(a, b)
Same as a //= b.
ilshift(a, b)
Same as a <<= b.
imod(a, b)
Same as a %= b.
imul(a, b)
Same as a *= b.
index(a)
Same as a.__index__()
indexOf(a, b)
Return the first index of b in a.
inv(a)
Same as ~a.
invert(a)
Same as ~a.
ior(a, b)
Same as a |= b.
ipow(a, b)
Same as a **= b.
irepeat(a, b)
Same as a *= b, where a is a sequence, and b is an integer.
irshift(a, b)
Same as a >>= b.
isCallable(a)
Same as callable(a).
isMappingType(a)
Return True if a has a mapping type, False otherwise.
isNumberType(a)
Return True if a has a numeric type, False otherwise.
isSequenceType(a)
Return True if a has a sequence type, False otherwise.
is_(a, b)
Same as a is b.
is_not(a, b)
Same as a is not b.
isub(a, b)
Same as a -= b.
itruediv(a, b)
Same as a /= b when __future__.division is in effect.
ixor(a, b)
Same as a ^= b.
le(a, b)
Same as a<=b.
lshift(a, b)
Same as a << b.
lt(a, b)
Same as a<b.
mod(a, b)
Same as a % b.
mul(a, b)
Same as a * b.
ne(a, b)
Same as a!=b.
neg(a)
Same as -a.
not_(a)
Same as not a.
or_(a, b)
Same as a | b.
pos(a)
Same as +a.
pow(a, b)
Same as a ** b.
repeat(a, b)
Return a * b, where a is a sequence, and b is an integer.
rshift(a, b)
Same as a >> b.
sequenceIncludes(a, b)
Same as b in a (note reversed operands; deprecated).
setitem(a, b, c)
Same as a[b] = c.
setslice(a, b, c, d)
Same as a[b:c] = d.
sub(a, b)
Same as a - b.
truediv(a, b)
Same as a / b when __future__.division is in effect.
truth(a)
Return True if a is true, False otherwise.
xor(a, b)
Same as a ^ b.
Trees Indices Help
Python Standard Library

AltStyle によって変換されたページ (->オリジナル) /