Runtime Data Attributes
method.__self__
Receiver bound to a Python method: an instance for instance methods, or a class for class methods. Binding supplies this receiver when called.
Formal Syntax & Structure
python syntaxpython
method.__self__Return Value
object
Value exposed by this attribute; availability and mutability depend on the owner as described.
Working Example
Example Snippetpython
class C: def f(self): return 7c = C(); m = c.fprint(m.__self__ is c)