Use collections.abc.Reversible if it exists by ilevkivskyi · Pull Request #194 · python/typing · GitHub
Skip to content

Use collections.abc.Reversible if it exists - #194

Merged
gvanrossum merged 9 commits into
python:masterfrom
ilevkivskyi:master
Apr 4, 2016
Merged

gvanrossum merged 9 commits into
python:masterfrom
ilevkivskyi:master

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #172 . I assumed that if Reversible is present in collections.abc then it means that http://bugs.python.org/issue25987 is resolved as Andrew Barnert proposes (as I understand @gvanrossum agrees with this), i.e., Sequence is subclass of Reversible, and not directly of Iterable.

if it exists. Also if it exists Reversible is a subclass of Iterable, and Sequence is subclass of Reversible.
@gvanrossum

Copy link
Copy Markdown
Member

@ilevkivskyi

Copy link
Copy Markdown
Member Author

Reversible is not always a protocol (it is a generic ABC if collections.abc.Reversible exists), but SupportsAbs is always a protocol.
Again, Reversible could not be a protocol.
@gvanrossum
gvanrossum merged commit 91f7ac5 into python:master Apr 4, 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.

Reversible should reference collections.abc.Reversible, if it exists

2 participants