BuiltinFunctionType.__self__

  • Thread starter Jacek Generowicz
  • Start date
J

Jacek Generowicz

Where can I find information on the __self__ attribute of builtin
functions ?
 
F

Fredrik Lundh

Jacek said:
Where can I find information on the __self__ attribute of builtin
functions ?

it's the same thing as im_self, but for methods/functions
implemented in C.

that is, if "x" is a bound method, "x.__self__" is the object
that method is bound to:
['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__getattribute__',
'__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__self__', '__setattr__', '__str__']['spam']

for unbound methods (and functions), it's set to None.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,474
Latest member
AntoniaDea

Latest Threads

Top