Message381703
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') |
|
Date |
User |
Action |
Args |
2020-11-24 00:44:11 | rhettinger | set | recipients:
+ rhettinger, docs@python, wim.glenn, MarSoft |
2020-11-24 00:44:11 | rhettinger | set | messageid: <1606178651.26.0.125221509301.issue34394@roundup.psfhosted.org> |
2020-11-24 00:44:11 | rhettinger | link | issue34394 messages |
2020-11-24 00:44:11 | rhettinger | create | |
|