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 yselivanov
Recipients gvanrossum, ncoghlan, vstinner, yselivanov
Date 2015-09-03.21:13:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441314827.75.0.533925414566.issue24995@psf.upfronthosting.co.za>
In-reply-to
Content
Should we raise something like "'int' object is not an asynchronous iterable", instead of "'async for' requires an object with __aiter__ method, got int"?


>>> foo().send(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in foo
TypeError: 'async for' requires an object with __aiter__ method, got int


>>> for i in 1: pass
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
History
Date User Action Args
2015-09-03 21:13:47yselivanovsetrecipients: + yselivanov, gvanrossum, ncoghlan, vstinner
2015-09-03 21:13:47yselivanovsetmessageid: <1441314827.75.0.533925414566.issue24995@psf.upfronthosting.co.za>
2015-09-03 21:13:47yselivanovlinkissue24995 messages
2015-09-03 21:13:47yselivanovcreate