PyDocs

Nav

Python Runtime Services

object.__pow__

builtins

method of object
  • object.__pow__(self, other[, modulo])
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |). For instance, to evaluate the expression x + y, where x is an instance of a class that has an __add__() method, type(x).__add__(x, y) is called. The __divmod__() method should be the equivalent to using __floordiv__() and __mod__(); it should not be related to __truediv__(). Note that __pow__() should be defined to accept an optional third argument if the three-argument version of the built-in pow() function is to be supported.
0 Examples
No examples for builtins/object.__pow__.
See Also
No see-alsos for builtins/object.__pow__
0 Notes
No notes for object.__pow__