Last active
December 15, 2015 04:39
-
-
Save mjtamlyn/5203598 to your computer and use it in GitHub Desktop.
collections.Iterable behaviour on py2.6/2.7
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
| import collections | |
| class Foo(object): | |
| def next(self): | |
| return | |
| f = Foo() | |
| isinstance(f, collections.Iterator) # True on py2.6, False on 2.7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment