PyDocs

Nav

Python Runtime Services

object

The base class of the class hierarchy.

When called, it accepts no arguments and returns a new featureless
instance that has no instance attributes and cannot be given any.
Members of object

_

__abs__
Called to implement the unary arithmetic operations (-, +, abs() and ~).
__add__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__aenter__
Semantically similar to __enter__(), the only difference being that it must return an awaitable.
__aexit__
Semantically similar to __exit__(), the only difference being that it must return an awaitable.
__aiter__
Must return an asynchronous iterator object.
__and__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__anext__
Must return an awaitable resulting in a next value of the iterator.
__annotate__
An annotate function.
__annotations__
This attribute contains the annotations for an object.
__await__
Must return an iterator.
__bool__
Called to implement truth value testing and the built-in operation bool(); should return False or True.
__buffer__
Called when a buffer is requested from self (for example, by the memoryview constructor).
__bytes__
Called by bytes to compute a byte-string representation of an object.
__call__
Call self as a function.
__ceil__
Called to implement the built-in function round() and math functions trunc(), floor() and ceil().
__class__
The class to which a class instance belongs.
__class_getitem__
Return an object representing the specialization of a generic class by type arguments found in key.
__complex__
Called to implement the built-in functions complex(), int() and float().
__contains__
Called to implement membership test operators.
__copy__
Called to implement the shallow copy operation; no additional arguments are passed.
__deepcopy__
Called to implement the deep copy operation; it is passed one argument, the memo dictionary.
__del__
Called when the instance is about to be destroyed.
__delattr__
Implement delattr(self, name).
__delete__
Called to delete the attribute on an instance instance of the owner class.
__delitem__
Called to implement deletion of self[key].
__dict__
A dictionary or other mapping object used to store an object’s (writable) attributes.
__dir__
Default dir() implementation.
__divmod__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__enter__
Enter the runtime context related to this object.
__eq__
Return self==value.
__exit__
Exit the runtime context related to this object.
__float__
Called to implement the built-in functions complex(), int() and float().
__floor__
Called to implement the built-in function round() and math functions trunc(), floor() and ceil().
__floordiv__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__format__
Default object formatter.
__ge__
Return self>=value.
__get__
Called to get the attribute of the owner class (class attribute access) or of an instance of that class (instance attribute access).
__getattr__
Called when the default attribute access fails with an AttributeError (either __getattribute__() raises an AttributeError because name is not an instance attribute or an attribute in the class tree f…
__getattribute__
Return getattr(self, name).
__getitem__
Called to implement subscription, that is, self[subscript].
__getnewargs__
This method serves a similar purpose as __getnewargs_ex__(), but supports only positional arguments.
__getnewargs_ex__
In protocols 2 and newer, classes that implement the __getnewargs_ex__() method can dictate the values passed to the __new__() method upon unpickling.
__getstate__
Helper for pickle.
__gt__
Return self>value.
__hash__
Return hash(self).
__iadd__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__iand__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__ifloordiv__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__ilshift__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__imatmul__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__imod__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__imul__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__index__
Called to implement operator.index(), and whenever Python needs to losslessly convert the numeric object to an integer object (such as in slicing, or in the built-in bin(), hex() and oct() functions).
__init__
Initialize self.
__init_subclass__
This method is called when a class is subclassed.
__int__
Called to implement the built-in functions complex(), int() and float().
__invert__
Called to implement the unary arithmetic operations (-, +, abs() and ~).
__ior__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__ipow__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__irshift__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__isub__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__iter__
This method is called when an iterator is required for a container.
__itruediv__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__ixor__
These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, @=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=).
__le__
Return self<=value.
__len__
Called to implement the built-in function len().
__length_hint__
Called to implement operator.length_hint().
__lshift__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__lt__
Return self<value.
__match_args__
This class variable can be assigned a tuple of strings.
__matmul__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__missing__
Called by dict.__getitem__() to implement self[key] for dict subclasses when key is not in the dictionary.
__mod__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__mro_entries__
If a base that appears in a class definition is not an instance of type, then an __mro_entries__() method is searched on the base.
__mul__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__ne__
Return self!=value.
__neg__
Called to implement the unary arithmetic operations (-, +, abs() and ~).
__new__
Create and return a new object.
__objclass__
The attribute __objclass__ is interpreted by the inspect module as specifying the class where this object was defined (setting this appropriately can assist in runtime introspection of dynamic class …
__or__
Return self|value.
__pos__
Called to implement the unary arithmetic operations (-, +, abs() and ~).
__pow__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__radd__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rand__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rdivmod__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__reduce__
Helper for pickle.
__reduce_ex__
Helper for pickle.
__release_buffer__
Called when a buffer is no longer needed.
__replace__
This method should create a new object of the same type, replacing fields with values from changes.
__repr__
Return repr(self).
__reversed__
Called (if present) by the reversed() built-in to implement reverse iteration.
__rfloordiv__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rlshift__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rmatmul__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rmod__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rmul__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__ror__
Return value|self.
__round__
Called to implement the built-in function round() and math functions trunc(), floor() and ceil().
__rpow__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rrshift__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rshift__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__rsub__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rtruediv__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__rxor__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |) with reflected (swapped) operands.
__set__
Called to set the attribute on an instance instance of the owner class to a new value, value.
__set_name__
Automatically called at the time the owning class owner is created.
__setattr__
Implement setattr(self, name, value).
__setitem__
Called to implement assignment to self[key].
__setstate__
Upon unpickling, if the class defines __setstate__(), it is called with the unpickled state.
__slots__
This class variable can be assigned a string, iterable, or sequence of strings with variable names used by instances.
__str__
Return str(self).
__sub__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__truediv__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
__trunc__
Called to implement the built-in function round() and math functions trunc(), floor() and ceil().
__xor__
These methods are called to implement the binary arithmetic operations (+, -, *, @, /, //, %, divmod(), pow(), **, <<, >>, &, ^, |).
0 Examples
No examples for builtins/object.
See Also
No see-alsos for builtins/object
0 Notes
No notes for object