Karen Tracey <[EMAIL PROTECTED]> added the comment: 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. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1242657> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com