Message387379
Oops, I realized it's not really a compiler bug. When the compiler sees
class C:
str: str = "abc"
if effectively rearranges that to
class C:
str = "abc"
__annotations__["str"] = str
(where __annotations__ is initialized to {} at the start of the class scope).
This goes to prove once again that silly things like
str: str
are an anti-pattern and should not be used. |
|
Date |
User |
Action |
Args |
2021-02-20 01:18:52 | gvanrossum | set | recipients:
+ gvanrossum, eric.smith, kj, xirdneh |
2021-02-20 01:18:52 | gvanrossum | set | messageid: <1613783932.6.0.423851458811.issue43257@roundup.psfhosted.org> |
2021-02-20 01:18:52 | gvanrossum | link | issue43257 messages |
2021-02-20 01:18:52 | gvanrossum | create | |
|