Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

For the record, __set_name__ isn't specific to descriptors.  It can be used 
with any class:

    >>> class A:
            def __set_name__(*args):
                print(args)
         
    >>> class B:
            x = A()
            y = A()
     
    (<__main__.A object at 0x7febfe01ac40>, <class '__main__.B'>, 'x')
    (<__main__.A object at 0x7febfe01a5e0>, <class '__main__.B'>, 'y')

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34394>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to