In questions there was one interesting note about how methods in Python are stored.
So, after instantiating class, every function becomes a method.
Method of class is object (everything is object in Python :) ) that is callable and has special useful attributes (not all listed here):
- im_func is the function object - it's actually original function
- im_self is the class instance object
- im_class is the class of im_self
Комментариев нет
Отправить комментарий