Martin Panter added the comment:

In Python 2, the old-style “instance” objects are making it hard to fix this 
like in Python 3. And completely removing the custom error message seems a bit 
drastic for 2.7.

Instead, I propose to just check for a generator type after the TypeError is 
caught, and don’t bother checking for other kinds of iterables and sequences.

----------
stage: commit review -> patch review
Added file: http://bugs.python.org/file41756/check-generator-py2.patch

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

Reply via email to