Skip to content

Make join(None, T) produce Optional[T] in strict-optional #1999

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

Merged
merged 2 commits into from
Aug 8, 2016

Conversation

ddfisher
Copy link
Collaborator

@ddfisher ddfisher commented Aug 8, 2016

Fixes #1820.

if isinstance(s, NoneTyp) and not isinstance(t, NoneTyp):
s, t = t, s

# Use a visitor to handle non-trivial cases.
return t.accept(TypeJoinVisitor(s))



Copy link
Member

Choose a reason for hiding this comment

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

You should never need three blank lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops! That was accidental. As they say, "0.002K blank lines ought to be enough for anybody".

@gvanrossum gvanrossum merged commit d83aece into master Aug 8, 2016
@gvanrossum gvanrossum deleted the join-none-optional branch August 8, 2016 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants