This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Update documentation about None vs type(None) in typing
Type: Stage:
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gvanrossum, michael0x2a, python-dev
Priority: normal Keywords: patch

Created on 2016-09-11 00:27 by michael0x2a, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
update-none-vs-type-none.patch michael0x2a, 2016-09-11 00:27
Messages (3)
msg275718 - (view) Author: Michael Lee (michael0x2a) * Date: 2016-09-11 00:27
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.
msg275720 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-11 01:49
New changeset 75514816741a by Guido van Rossum in branch '3.5':
Issue #28073: Improve wording around None. Michael Lee.
https://hg.python.org/cpython/rev/75514816741a

New changeset 7a4a16a880a4 by Guido van Rossum in branch 'default':
Issue #28073: Improve wording around None. Michael Lee. (3.5->3.6)
https://hg.python.org/cpython/rev/7a4a16a880a4
msg275721 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-09-11 01:50
Thanks! Busy Saturday  night, right? :-)
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72260
2016-09-11 01:50:17gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg275721
2016-09-11 01:49:44python-devsetnosy: + python-dev
messages: + msg275720
2016-09-11 00:27:08michael0x2acreate