Ilja Everilä added the comment:

I have 0 beef with it being the TypeError as long as the exception chain is 
kept intact, especially since PY3 makes it possible. With current behaviour 
heisenbugs would produce some serious hair pulling, until one figures out that 
it is actually the __iter__ raising an exception.

With that in mind, take an object implementing the __iter__ dunder correctly 
999,999 times out of a million. Is it not iterable?

Unfortunately I lack the experience with CPython C API to do something about 
this. Tests on the other hand I suppose I could manage, if a consensus on the 
behaviour can be reached.

----------

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

Reply via email to