homepage

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 Julian
Recipients Julian
Date 2012年06月07日.05:23:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1339046592.67.0.693988189804.issue15023@psf.upfronthosting.co.za>
In-reply-to
Content
The following code raises an unexpected exception:
 class Foo(object):
 def __len__(self):
 raise Exception()
 def __iter__(self):
 return iter([])
 list(Foo())
In the optimizations being done in listextend, it appears len is getting called first for some reason (sorry, haven't gotten a chance to step through it carefully yet).
Tangentially, PyPy (correctly I guess) throws no such exception.
History
Date User Action Args
2012年06月07日 05:23:12Juliansetrecipients: + Julian
2012年06月07日 05:23:12Juliansetmessageid: <1339046592.67.0.693988189804.issue15023@psf.upfronthosting.co.za>
2012年06月07日 05:23:11Julianlinkissue15023 messages
2012年06月07日 05:23:11Juliancreate

AltStyle によって変換されたページ (->オリジナル) /