Message314446
That's a tough one. Because C.d is not set to a descriptor at type creation time (it's set to a Field object), the __set_name__ behavior is never invoked. It's when the @dataclass decorator is called that C.d is set to D().
https://docs.python.org/3/reference/datamodel.html#creating-the-class-object
I'm not sure it's possible to work around this without duplicating some of the type creation code, and even then I'm not convinced it's doable. |
|
Date |
User |
Action |
Args |
2018-03-26 10:28:57 | eric.smith | set | recipients:
+ eric.smith, Ricyteach |
2018-03-26 10:28:57 | eric.smith | set | messageid: <1522060137.7.0.467229070634.issue33141@psf.upfronthosting.co.za> |
2018-03-26 10:28:57 | eric.smith | link | issue33141 messages |
2018-03-26 10:28:57 | eric.smith | create | |
|