Message4851

Author pjenvey
Recipients pjenvey
Date 2009-06-22.06:36:03
SpamBayes Score 3.18634e-13
Marked as misclassified No
Message-id <1245652564.49.0.377935844448.issue1385@psf.upfronthosting.co.za>
In-reply-to
Content
Jython 2.5.0+ (trunk:6489M, Jun 21 2009, 16:33:51) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_07
Type "help", "copyright", "credits" or "license" for more information.
>>> genexp = (i for i in range(2))
>>> genexp.throw(Exception)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Exception
>>> genexp.gi_frame
<frame object at 0x1>
>>> genexp.next()
0

Python 2.5.4 (r254:67916, Apr 15 2009, 13:13:35) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> genexp = (i for i in range(2))
>>> genexp.throw(Exception)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <genexpr>
Exception
>>> genexp.gi_frame
>>> genexp.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration

Works as expected if the generator was already started (the stack trace 
is also improved)

Jython 2.5.0+ (trunk:6489M, Jun 21 2009, 16:33:51) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_07
Type "help", "copyright", "credits" or "license" for more information.
>>> genexp = (i for i in range(5))
>>> genexp.next()
0
>>> genexp.throw(Exception)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <genexpr>
Exception
>>> genexp.gi_frame
>>> genexp.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration
History
Date User Action Args
2009-06-22 06:36:04pjenveysetrecipients: + pjenvey
2009-06-22 06:36:04pjenveysetmessageid: <1245652564.49.0.377935844448.issue1385@psf.upfronthosting.co.za>
2009-06-22 06:36:04pjenveylinkissue1385 messages
2009-06-22 06:36:03pjenveycreate