[pypy-svn] r7325 - pypy/trunk/src/pypy/objspace/flow
arigo at codespeak.net
arigo at codespeak.net
Wed Nov 17 15:44:50 CET 2004
Author: arigo
Date: Wed Nov 17 15:44:49 2004
New Revision: 7325
Modified:
pypy/trunk/src/pypy/objspace/flow/objspace.py
Log:
Detect early a situation which throws the flow object space into an infinite
loop.
Modified: pypy/trunk/src/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/flow/objspace.py Wed Nov 17 15:44:49 2004
@@ -140,6 +140,12 @@
len(result), expected_length)
return result
+ def unpackiterable(self, w_iterable, expected_length=None):
+ if isinstance(w_iterable, Variable) and expected_length is None:
+ raise UnwrapException, ("cannot unpack a Variable iterable "
+ "without knowing its length")
+ return ObjSpace.unpackiterable(self, w_iterable, expected_length)
+
# ____________________________________________________________
def do_operation(self, name, *args_w):
spaceop = SpaceOperation(name, args_w, Variable())
More information about the Pypy-commit
mailing list