Author gvanrossum
Recipients gvanrossum, josh.r, levkivskyi, rhettinger, sproshev
Date 2018-04-23.04:23:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524457435.56.0.682650639539.issue33315@psf.upfronthosting.co.za>
In-reply-to
Content
[Raymond]
> I don't think it makes sense to let typing considerations
> start to spill into the rest of the standard library.
> Either add support to typing or not.

We can't possibly add every stdlib class that's generic to typing.py -- it just doesn't scale. It also doesn't make sense to import everything from typing.

Arguably there are already some things in typing that don't belong there -- I'm thinking in particular of the 'io' and 're' classes. Those were a compromise to get the (in my opinion) most popular and fundamental classes quickly typed. But we definitely shouldn't continue down this path. Type annotations is here to stay (there's an increasing number of PEPs about it) and in the longer term we should support it directly in the appropriate stdlib modules. We're not ready to do that but we should start thinking about it.

Until we've gotten a firmer decision I don't think we should do one-offs, so I don't think Queue should be made generic right now, but we definitely shouldn't add it to typing. Users who are using typing should continue to consider themselves lucky to be early adopters and will occasionally pay a small price, such as putting the type in quotes or (for users on 3.7+) using "from __future__ import annotations".

PS. Raymond, please avoid pejoratives like "spill" in the future when talking about types.
History
Date User Action Args
2018-04-23 04:23:55gvanrossumsetrecipients: + gvanrossum, rhettinger, josh.r, levkivskyi, sproshev
2018-04-23 04:23:55gvanrossumsetmessageid: <1524457435.56.0.682650639539.issue33315@psf.upfronthosting.co.za>
2018-04-23 04:23:55gvanrossumlinkissue33315 messages
2018-04-23 04:23:55gvanrossumcreate