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 kmtracey
Recipients georg.brandl, kmtracey, rhettinger, stevea_zope
Date 2008-07-18.18:58:14
SpamBayes Score 0.003943651
Marked as misclassified No
Message-id <1216407495.49.0.814099763715.issue1242657@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for responding.

It had been fixed.  2.4/2.5 behave like so:

Python 2.5.1 (r251:54863, Mar  7 2008, 04:10:12) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class F(object):
...     def __iter__(self):
...         yield 23
...     def __len__(self):
...         print 'len called, raising KeyboardInterrupt'
...         raise KeyboardInterrupt
... 
>>> f = F()
>>> list(f)
len called, raising KeyboardInterrupt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 6, in __len__
KeyboardInterrupt
>>> 

It just seems to have regressed in 2.6.
History
Date User Action Args
2008-07-18 18:58:15kmtraceysetspambayes_score: 0.00394365 -> 0.003943651
recipients: + kmtracey, georg.brandl, rhettinger, stevea_zope
2008-07-18 18:58:15kmtraceysetspambayes_score: 0.00394365 -> 0.00394365
messageid: <1216407495.49.0.814099763715.issue1242657@psf.upfronthosting.co.za>
2008-07-18 18:58:14kmtraceylinkissue1242657 messages
2008-07-18 18:58:14kmtraceycreate