[docs] [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments

Ville Skyttä report at bugs.python.org
Sun Aug 5 02:51:25 EDT 2018


New submission from Ville Skyttä <ville.skytta at iki.fi>:

The documentation of typing.Optional seems to promote practices for not specifying Optional that are recommended against in PEP 484:

https://www.python.org/dev/peps/pep-0484/#union-types -- end of chapter recommends against inferring Optional.

https://docs.python.org/3.8/library/typing.html#typing.Optional -- second paragraph promotes the possibility of leaving out Optional.

I'm not sure how to improve the typing.Optional doc wording, perhaps it would be better to just remove the second paragraph altogether.

----------
assignee: docs at python
components: Documentation
messages: 323132
nosy: docs at python, scop
priority: normal
severity: normal
status: open
title: Don't promote possibility to omit Optional on optional/defaulted arguments
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34336>
_______________________________________


More information about the docs mailing list