8000 Follow up for #283 (response to comments) including change in Union[X, Any] by ilevkivskyi · Pull Request #288 · python/typing · GitHub
[go: up one dir, main page]

Skip to content

Conversation

ilevkivskyi
Copy link
Member

Fixes #285

@gvanrossum Please take a look.
Later I will make a PR to python/peps and will submit a documentation patch to b.p.o.

u = Union[int, Any]
self.assertEqual(u, Any)
u = Union[Any, int]
self.assertEqual(u, Any)
Copy link
Member

Choose a reason for hiding this comment

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

Why not keep the test but change the asserts to test for the new behavior?

- Similar for object::
Union[int, object] == object
Copy link
Member

Choose a reason for hiding this comment

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

I'd keep this even though it's not a special case -- it's a nice edge case that confirms the rule.

@ilevkivskyi
Copy link
Member Author

@gvanrossum I agree with both points. Implemented this in a new commit.

@gvanrossum gvanrossum merged commit 185df0a into python:master Sep 29, 2016
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

0