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
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
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
Changes by Mathias Rav :
--
pull_requests: +1155
___
Python tracker
<http://bugs.python.org/issue29974>
___
___
Python-bugs-list mailing list
Unsubscribe:
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.