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@python
components: Documentation
files: update-none-vs-type-none.patch
keywords: patch
messages: 275718
nosy: docs@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28073>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to