This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ilja Everilä
Recipients Ilja Everilä, terry.reedy
Date 2016-02-29.20:15:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456776917.94.0.452539013581.issue26407@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-02-29 20:15:17Ilja Everiläsetrecipients: + Ilja Everilä, terry.reedy
2016-02-29 20:15:17Ilja Everiläsetmessageid: <1456776917.94.0.452539013581.issue26407@psf.upfronthosting.co.za>
2016-02-29 20:15:17Ilja Everilälinkissue26407 messages
2016-02-29 20:15:17Ilja Everiläcreate