This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Karl Kornel
Recipients Karl Kornel, docs@python
Date 2019-10-02.18:31:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1570041077.58.0.399304866649.issue38352@roundup.psfhosted.org>
In-reply-to
Content
Hello!

In https://github.com/python/cpython/blob/master/Lib/typing.py#L115-L117, there is a note about the io and re classes not being included in typing.__all__.  I am a relatively new user of typing, and I did `from typing import *` in my code.  I ran the code through mypy first, which reported no problems, but then running Python 3.6 failed with a NameError (name 'IO' is not defined).

Reading through the typing source, it's clear that this was an intentional decision.  So, instead of reporting a bug, I'd like to request a documentation enhancement!

The docs for typing make no mention of typing.io or typing.re.  So, my request is: In the sections for the IO/TextIO/BinaryIO and Pattern/Match classes, include text warning the user that these types are not imported when you do `from typing import *`.
History
Date User Action Args
2019-10-02 18:31:17Karl Kornelsetrecipients: + Karl Kornel, docs@python
2019-10-02 18:31:17Karl Kornelsetmessageid: <1570041077.58.0.399304866649.issue38352@roundup.psfhosted.org>
2019-10-02 18:31:17Karl Kornellinkissue38352 messages
2019-10-02 18:31:17Karl Kornelcreate