Message353763
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 *`. |
|
Date |
User |
Action |
Args |
2019-10-02 18:31:17 | Karl Kornel | set | recipients:
+ Karl Kornel, docs@python |
2019-10-02 18:31:17 | Karl Kornel | set | messageid: <1570041077.58.0.399304866649.issue38352@roundup.psfhosted.org> |
2019-10-02 18:31:17 | Karl Kornel | link | issue38352 messages |
2019-10-02 18:31:17 | Karl Kornel | create | |
|