Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-34336: Don't promote possibility to leave out typing.Optional #8677

Merged
merged 1 commit into from
Aug 5, 2018

Conversation

scop
Copy link
Contributor

@scop scop commented Aug 5, 2018

@@ -988,13 +988,6 @@ The module defines the following classes, functions and decorators:

``Optional[X]`` is equivalent to ``Union[X, None]``.

Note that this is not the same concept as an optional argument,
which is one that has a default. An optional argument with a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the first sentence (i.e. Note that this is not the same concept as an optional argument, which is one that has a default.). You might also add examples, e.g. def (arg: int = 0) vs. def foo(a: Optional[int] = None).

@scop
Copy link
Contributor Author

scop commented Aug 5, 2018

Ok, left that in and rephrased the rest of the paragraph to use the suggested examples.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm not sure if this deserves a news item -- I'd think not (it's just a minor documentation tweak) but another core dev can decide.

@ericvsmith
Copy link
Member

I don't see any need for a news entry.

@ilevkivskyi ilevkivskyi merged commit 336c945 into python:master Aug 5, 2018
@bedevere-bot
Copy link

@ilevkivskyi: Please replace # with GH- in the commit message next time. Thanks!

@ilevkivskyi
Copy link
Member

Hm, I also forgot to add backport labels. @scop will you have time to make manual backports to 3.6 and 3.7? Thanks!

(If no, then I can do this.)

@Mariatta
Copy link
Member

Mariatta commented Aug 5, 2018

@ilevkivskyi you can still add the backport labels after merge and see if it will backport cleanly.

@ilevkivskyi
Copy link
Member

Oh, wow, I didn't know. Thank you Mariatta!

@miss-islington
Copy link
Contributor

Thanks @scop for the PR, and @ilevkivskyi for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @scop for the PR, and @ilevkivskyi for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-8679 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 5, 2018
@bedevere-bot
Copy link

GH-8680 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 5, 2018
miss-islington added a commit that referenced this pull request Aug 5, 2018
miss-islington added a commit that referenced this pull request Aug 5, 2018
@scop scop deleted the bpo-34336 branch August 6, 2018 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants