__set_name__ equivalent for instance

Dom Grigonis dom.grigonis at gmail.com
Wed Nov 15 11:44:11 EST 2023


So there is a method __set_name__ which is called on class creation.

The functionality that I am interested in is not retrieving name, but the fact that it also receives `owner` argument.

Thus, allowing simulation of bound class method.

I was wandering if there is an equivalent functionality of attribute to receive `instance` argument on instance creation.

Regards,
DG


More information about the Python-list mailing list