Éric Araujo <mer...@netwok.org> added the comment: > hasattr("lol", '__next__') == False, even though strings are Iterable
FYI, magic methods are looked up on the class, not on the instance. That’s why ABCs are the right thing to use here. http://docs.python.org/dev/reference/datamodel#special-method-names ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3243> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com