[Python-ideas] Enhancement: Adding support for private and name mangled type hints in dataclasses module

2020-08-23 Thread zachb1996--- via Python-ideas
I have a proposal for an addition to the dataclasses module that I think would make it easier to use private and name mangled variables. One of the benefits of the dataclass decorator is that it helps lessen the amount of code when you just need a simple constructor. A common pattern in python th

[Python-ideas] Re: Enhancement: Adding support for private and name mangled type hints in dataclasses module

2020-08-24 Thread zachb1996--- via Python-ideas
While I agree that this is a subset of the idea of having a different attribute name, I think this naming convention is very common, and is even referenced in the python documentation. Which is why I think it would warrant being built in as opposed to using an InitVar. So the way attrs deals wi