FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

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

Repository navigation

Follow up for #283 (response to comments) including change in Union[X, Any] - #288

Merged
gvanrossum merged 3 commits into
python:masterfrom
ilevkivskyi:master
Sep 29, 2016
Merged

gvanrossum merged 3 commits into
python:masterfrom
ilevkivskyi:master

Conversation

Copy link
Copy Markdown
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.

Comment thread python2/test_typing.py
u = Union[int, Any]
self.assertEqual(u, Any)
u = Union[Any, int]
self.assertEqual(u, Any)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Comment thread python2/typing.py

- Similar for object::

Union[int, object] == object

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Member Author

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

gvanrossum merged commit 185df0a into python:master Sep 29, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL