[pypy-svn] rev 2677 - pypy/trunk/src/pypy/interpreter
alex at codespeak.net
alex at codespeak.net
Mon Dec 22 17:02:32 CET 2003
Author: alex
Date: Mon Dec 22 17:02:31 2003
New Revision: 2677
Modified:
pypy/trunk/src/pypy/interpreter/generator.py
Log:
fixed the bug w/generators and propagating StopIteration exceptions
Modified: pypy/trunk/src/pypy/interpreter/generator.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/generator.py (original)
+++ pypy/trunk/src/pypy/interpreter/generator.py Mon Dec 22 17:02:31 2003
@@ -64,7 +64,12 @@
raise NoValue
self.running = True
try:
- return Frame.run(self.frame)
+ try: return Frame.run(self.frame)
+ except OperationError, e:
+ if e.w_type is self.space.w_StopIteration:
+ raise NoValue
+ else:
+ raise
finally:
self.running = False
More information about the Pypy-commit
mailing list