[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Mathias Rav
Mathias Rav added the comment: Sorry for making a typo in your last name, Ivan Levkivskyi! I should know better and use copy-and-paste. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-04 Thread Mathias Rav
Mathias Rav added the comment: I have updated the patch after feedback from Jelle Zijlstra and Ivan Levkevskyi. Indeed the example was correct; the patch now adds wording from PEP 484 and PEP 526 to clarify why a function parameter annotation needs to be in quotes and a local variable

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-04 Thread Mathias Rav
Changes by Mathias Rav : -- title: typing.TYPE_CHECKING doc example is incorrect -> Change typing.TYPE_CHECKING doc example ___ Python tracker <http://bugs.python.org/issu

[issue29974] typing.TYPE_CHECKING doc example is incorrect

2017-04-03 Thread Mathias Rav
Changes by Mathias Rav : -- pull_requests: +1155 ___ Python tracker <http://bugs.python.org/issue29974> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29974] typing.TYPE_CHECKING doc example is incorrect

2017-04-03 Thread Mathias Rav
New submission from Mathias Rav: The documentation of typing.TYPE_CHECKING has an example (introduced in issue #26141) that would lead to NameError at runtime. The example shows how to limit the import of "expensive_mod" to type checkers, but then goes on to use "expensive_mod.