Op 2017-09-25, Stefan Ram schreef <r...@zedat.fu-berlin.de>:

>   So, is there some mechanism in Python that can bind a method
>   to an object so that the caller does not have to specify the
>   object in the call?
>
>   If so, how is this mechanism called?
>

Others have already explained the details how functions become bound
methods, but I would just point out that it is an instance of a piece of
very general functionality: the descriptor protocol.

https://docs.python.org/3.6/howto/descriptor.html

With this, you can create your own objects which do some arbitrary
special thing when accesses on an instance.

Stephan
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to