Skip to content

Commit 1c50730

Browse files
authored
Fix minor docs inaccuracy: NoneType is exposed in the types module on Python 3.10+ (#12515)
1 parent b44d2bc commit 1c50730

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/source/kinds_of_types.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,9 @@ case you should add an explicit ``Optional[...]`` annotation (or type comment).
391391

392392
The Python interpreter internally uses the name ``NoneType`` for
393393
the type of ``None``, but ``None`` is always used in type
394-
annotations. The latter is shorter and reads better. (Besides,
395-
``NoneType`` is not even defined in the standard library.)
394+
annotations. The latter is shorter and reads better. (``NoneType``
395+
is available as :py:data:`types.NoneType` on Python 3.10+, but is
396+
not exposed at all on earlier versions of Python.)
396397

397398
.. note::
398399

0 commit comments

Comments
 (0)