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 serhiy.storchaka
Recipients Camion, eric.smith, r.david.murray, rhettinger, serhiy.storchaka, steven.daprano, terry.reedy
Date 2017-12-18.21:40:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513633226.62.0.213398074469.issue32259@psf.upfronthosting.co.za>
In-reply-to
Content
Is it worth to emit more specific (but possible uniform) error messages in other unpacking cases (see msg307999)?

FYI if a class implements __iter__ which returns non-iterable, the following error is raised:

>>> class C:
...     def __iter__(self):
...         return 1
... 
>>> a, b = C()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: iter() returned non-iterator of type 'int'
History
Date User Action Args
2017-12-18 21:40:26serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, terry.reedy, eric.smith, steven.daprano, r.david.murray, Camion
2017-12-18 21:40:26serhiy.storchakasetmessageid: <1513633226.62.0.213398074469.issue32259@psf.upfronthosting.co.za>
2017-12-18 21:40:26serhiy.storchakalinkissue32259 messages
2017-12-18 21:40:26serhiy.storchakacreate