Josh Rosenberg added the comment:

I also wrote a slightly more thorough patch that simplifies some of the method 
implementations (largely just replacing a bunch of for/if/return True/False 
else return False/True with any/all calls against a generator expression).

The one behavior difference is that I dramatically simplified Sequence's 
__iter__; the original just kept indexing until it got IndexError, the 
replacement just runs len(self) times, on the theory that a self-mutating 
Sequence should write its own __iter__, and we shouldn't jump through hoops to 
accommodate unsupported behavior like mutating a Sequence during iteration.

All tests pass under both patches.

----------
Added file: http://bugs.python.org/file35143/collections_abc_cleanup.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21421>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to