[issue45384] Accept Final as indicating ClassVar for dataclass

Gregory Beauregard report at bugs.python.org
Thu Oct 14 14:36:38 EDT 2021


Gregory Beauregard <greg at greg.red> added the comment:

Hi Michael,

Thanks for taking the time to look into this.

I don't feel strongly enough about following the existing PEP wording to desire creating a situation where instance vars can't be marked Final if we can instead make a workaround with ClassVar[Final[...]]. Plus, I can appreciate the argument that dataclasses are their own thing that should be treated specially in the PEP.

If you know what's involved in formally proposing and enacting a PEP amendment I can get behind that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45384>
_______________________________________


More information about the Python-bugs-list mailing list