Message370090
To clarify, for Eric: what Batuhan did is effectively adding `from __future__ import annotations` to the top of dataclasses.py.
I believe the root cause is that dataclasses creates functions by synthesizing `def` statements (in _create_fn()) and the annotations there are references to variables in a dedicated namespace. Maybe we should patch the __annotations__ attribute of the result before sticking it into the class? |
|
Date |
User |
Action |
Args |
2020-05-27 14:58:41 | gvanrossum | set | recipients:
+ gvanrossum, vstinner, eric.smith, lukasz.langa, yselivanov, BTaskaya |
2020-05-27 14:58:41 | gvanrossum | set | messageid: <1590591521.6.0.958192482153.issue40794@roundup.psfhosted.org> |
2020-05-27 14:58:41 | gvanrossum | link | issue40794 messages |
2020-05-27 14:58:41 | gvanrossum | create | |
|