[Python-ideas] Moving typing out of the stdlib in Python 3.7?
Chris Angelico
rosuav at gmail.com
Fri Nov 3 10:45:11 EDT 2017
On Sat, Nov 4, 2017 at 1:35 AM, Guido van Rossum <guido at python.org> wrote:
> [A copy from https://github.com/python/typing/issues/495 to get more
> people's attention to this issue.]
>
> I'm wondering if we should remove typing from the stdlib. Now's the time to
> think about this, as the feature freeze for 3.7 is about 12 weeks away.
>
> Cons:
>
> People have to depend on a PyPI package to use typing (but they do anyway
> for typing_extensions)
If the lazy evaluation of annotations (PEP 563) also lands in 3.7,
then this would be a very minor downside. You'd need to pip-install
typing as well as mypy *for the actual type checking*, but at run
time, you could ignore both (all those List[...] annotations would be
stored unevaluated). Otherwise, it'd mean that any project that makes
use of type hints would require typing as a run-time dependency.
ChrisA
More information about the Python-ideas
mailing list