@@ -13,7 +13,7 @@ Abstract
1313========
1414
1515This PEP proposes adding a new keyword ``__type_checking__ `` that serves the
16- same purpose as `` typing.TYPE_CHECKING ` `.
16+ same purpose as :data: ` typing.TYPE_CHECKING `.
1717This constant is ``True `` when the code is being analyzed by a static type
1818checker, and ``False `` during normal runtime execution.
1919
@@ -43,8 +43,8 @@ Specification
4343It can be used in the same way as ``False ``, except it can not be used as
4444a matching pattern.
4545
46- Similar to typing.TYPE_CHECKING, type checking tools should treat
47- ``__type_checking__ `` as True.
46+ Similar to :data: ` typing.TYPE_CHECKING ` , type checking tools should treat
47+ ``__type_checking__ `` as `` True `` .
4848
4949
5050Rationale
@@ -69,15 +69,14 @@ How to teach this
6969Add this note to the ``typing.TYPE_CHECKING `` document:
7070
7171> If you don't want to import ``typing ``, you can use ``__type_checking__ ``.
72- > Workaround like ``TYPE_CHECKING = False `` or
72+ > Workarounds like ``TYPE_CHECKING = False `` or
7373> ``if False: # TYPE_CHECKING `` are not recommended since Python 3.14.
7474
7575
76- Resources
77- =========
76+ Reference Implementation
77+ ========================
7878
79- * Previous discussion: https://discuss.python.org/t/76766
80- * Reference Implementation: https://github.com/python/cpython/pull/131641
79+ * `python/cpython#131641 <https://github.com/python/cpython/pull/131641 >`__
8180
8281
8382Copyright
0 commit comments