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: Don't promote possibility to omit Optional on optional/defaulted arguments
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, levkivskyi, miss-islington, scop
Priority: normal Keywords: patch

Created on 2018-08-05 06:51 by scop, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8677 merged scop, 2018-08-05 06:53
PR 8679 merged miss-islington, 2018-08-05 17:04
PR 8680 merged miss-islington, 2018-08-05 17:04
Messages (4)
msg323132 - (view) Author: Ville Skyttä (scop) * Date: 2018-08-05 06:51
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.
msg323159 - (view) Author: Ivan Levkivskyi (levkivskyi) * (Python committer) Date: 2018-08-05 16:38
New changeset 336c945858055059a65134d4c501a85037d70d99 by Ivan Levkivskyi (Ville Skyttä) in branch 'master':
bpo-34336: Don't promote possibility to leave out typing.Optional (#8677)
https://github.com/python/cpython/commit/336c945858055059a65134d4c501a85037d70d99
msg323164 - (view) Author: miss-islington (miss-islington) Date: 2018-08-05 17:22
New changeset 02c4eae35cd24ab71c12b5e61ec22e993ac4839b by Miss Islington (bot) in branch '3.6':
bpo-34336: Don't promote possibility to leave out typing.Optional (GH-8677)
https://github.com/python/cpython/commit/02c4eae35cd24ab71c12b5e61ec22e993ac4839b
msg323166 - (view) Author: miss-islington (miss-islington) Date: 2018-08-05 17:36
New changeset e610c4f9984d50b45eb00e04c73c4208c0542a3b by Miss Islington (bot) in branch '3.7':
bpo-34336: Don't promote possibility to leave out typing.Optional (GH-8677)
https://github.com/python/cpython/commit/e610c4f9984d50b45eb00e04c73c4208c0542a3b
History
Date User Action Args
2022-04-11 14:59:04adminsetgithub: 78517
2018-08-05 17:43:07levkivskyisetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-08-05 17:36:07miss-islingtonsetmessages: + msg323166
2018-08-05 17:22:50miss-islingtonsetnosy: + miss-islington
messages: + msg323164
2018-08-05 17:04:37miss-islingtonsetpull_requests: + pull_request8175
2018-08-05 17:04:21miss-islingtonsetpull_requests: + pull_request8174
2018-08-05 16:38:07levkivskyisetnosy: + levkivskyi
messages: + msg323159
2018-08-05 06:53:25scopsetkeywords: + patch
stage: patch review
pull_requests: + pull_request8172
2018-08-05 06:51:25scopcreate