[docs] [issue28073] Update documentation about None vs type(None) in typing

Michael Lee report at bugs.python.org
Sat Sep 10 20:27:09 EDT 2016


New submission from Michael Lee:

For some reason, the section of the typing docs about Optional stated that Optional[T] was equivalent to Union[T, type(None)]. While this is true, it's somewhat inconsistent and potentially confusing since everywhere else in the docs, we just use None.

This patch modifies that line to use Union[T, type(None)] instead, and moves the line explaining that None is special-cased to mean type(None) to the first usage of None as a type within the docs.

----------
assignee: docs at python
components: Documentation
files: update-none-vs-type-none.patch
keywords: patch
messages: 275718
nosy: docs at python, gvanrossum, michael0x2a
priority: normal
severity: normal
status: open
title: Update documentation about None vs type(None) in typing
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44542/update-none-vs-type-none.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28073>
_______________________________________


More information about the docs mailing list