[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2017-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: I agree that it would just be confusing if the Python 3 docs were to explain Python 2 specific things. Maybe this should be explained in the mypy docs (or maybe it's really a mypy bug). Can you open an issue there? -- nosy: +gvanrossum resolution:

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-22 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-17 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Unless of course you mean pip installing typing for Py2 and then using ``# type`` comments to provide the types. Even in that case, I don't really think the documentation for Python 3.5 should be mentioning types in 2.7, that'd get confusing. --

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-17 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: The ``typing`` module doesn't exist in Python 2.7. All code samples provided in the docs *work* since no type-checking is performed by Python. That is, no enforcing of the types provided is made, that's for 3rd party packages to supply. -- no

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2016-12-17 Thread Alex Jurkiewicz
New submission from Alex Jurkiewicz: The typing.AnyStr documentation: https://docs.python.org/3/library/typing.html#typing.AnyStr It gives some examples using u-strings (u'foo') but doesn't make explicit some subtleties about behaviour with Python 2. Specifically, with Python 2 all the given