[Python-Dev] Is static typing still optional?
Eric V. Smith
eric at trueblade.com
Fri Dec 15 06:22:09 EST 2017
On 12/15/2017 5:56 AM, Steve Holden wrote:
> On Mon, Dec 11, 2017 at 5:10 PM, Chris Barker - NOAA Federal
> <chris.barker at noaa.gov <mailto:chris.barker at noaa.gov>> wrote:
...
>> However, typing is not currently imported by dataclasses.py.
>
> And there you have an actual reason besides my uneasiness :-)
>
> - CHB
>
> hmm...
[Agreed with Antoine on the MUA and quoting being confusing.]
The only reason typing isn't imported is performance. I hope that once
PEP 560 is complete this will no longer be an issue, and dataclasses
will always import typing. But of course typing will still not be needed
for most uses of @dataclass or make_dataclass(). This is explained in
the PEP.
Eric.
More information about the Python-Dev
mailing list