You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think SERIES_STD: Final = SERIES_STD should trigger a diagnostic [no-redef]
This is what I initially expected to happen. I don't love it, but it is what is specified in PEP 591
The two main rules for defining a final name are:
There can be at most one final declaration per module or class for a given attribute. There can’t be separate class-level and instance-level constants with the same name.
There must be exactly one assignment to a final name
Activity
sterliakov commentedon Oct 30, 2025
I think
SERIES_STD: Final = SERIES_STDshould trigger a diagnostic[no-redef], this is no better thanThis must have something to do with us stripping
Finalearly after setting the flag.avylove commentedon Oct 30, 2025
This is what I initially expected to happen. I don't love it, but it is what is specified in PEP 591