[issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments
New submission from Ville Skyttä <ville.skytta@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@python components: Documentation messages: 323132 nosy: docs@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@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
Change by Ville Skyttä <ville.skytta@iki.fi>: ---------- keywords: +patch pull_requests: +8172 stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
Ivan Levkivskyi <levkivskyi@gmail.com> added the comment: 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/336c945858055059a65134d4c501a85037d... ---------- nosy: +levkivskyi _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +8174 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +8175 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: 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/02c4eae35cd24ab71c12b5e61ec22e993ac... ---------- nosy: +miss-islington _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: 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/e610c4f9984d50b45eb00e04c73c4208c05... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
Change by Ivan Levkivskyi <levkivskyi@gmail.com>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34336> _______________________________________
participants (3)
-
Ivan Levkivskyi
-
miss-islington
-
Ville Skyttä