[Python-Dev] Remove typing from the stdlib (was: Reminder: 12 weeks to 3.7 feature code cutoff)

Brett Cannon brett at python.org
Fri Nov 3 13:46:21 EDT 2017

On Fri, 3 Nov 2017 at 08:09 Paul Moore <p.f.moore at gmail.com> wrote:

> On 3 November 2017 at 14:50, Serhiy Storchaka <storchaka at gmail.com> wrote:
> > 03.11.17 16:36, Guido van Rossum пише:
> >> Maybe we should remove typing from the stdlib?
> >> https://github.com/python/typing/issues/495
> >
> > I didn't use typing, but AFAIK the most used feature from typing is
> > NamedTuple. If move NamedTuple and maybe other convenient classes not
> > directly related to typing into collections or types modules, I think
> > removing typing from the stdlib will less stress people.
> (Checks docs) Hmm, I'd missed that this was even in there.
> Regardless of what happens with the typing module, I think this should
> be moved. I expect there are many people who never looked at the docs
> of the typing module because they don't use type annotations. I know
> the class uses type annotations to define its attributes, but I don't
> see that as an issue. Data classes do the same, and they won't be in
> the typing module...

There is another option and that's splitting up the typing module into
core, abstract things, and then the stuff that is about concrete types. For
instance, ClassVar, Union, and cast() are all abstract concepts that are
basic to type hints. But things like Mapping are more concrete and not a
fundamental concept to type hints. You could argue that the fundamentals
that won't change could stay in the stdlib while the concrete type classes
could get pulled out so they can be managed more easily/quickly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171103/cd965c8f/attachment.html>

More information about the Python-Dev mailing list