[pypy-svn] r37775 - pypy/dist/pypy/objspace/std

cfbolz at codespeak.net cfbolz at codespeak.net
Fri Feb 2 00:11:57 CET 2007


Author: cfbolz
Date: Fri Feb  2 00:11:55 2007
New Revision: 37775

Modified:
   pypy/dist/pypy/objspace/std/listobject.py
Log:
at least check for the empty list that we just put there


Modified: pypy/dist/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listobject.py	(original)
+++ pypy/dist/pypy/objspace/std/listobject.py	Fri Feb  2 00:11:55 2007
@@ -32,7 +32,10 @@
     w_iterable, = __args__.parse('list',
                                (['sequence'], None, None),   # signature
                                [EMPTY_LIST])                 # default argument
-    w_list.wrappeditems = space.unpackiterable(w_iterable)
+    if w_iterable is EMPTY_LIST:
+        w_list.wrappeditems = []
+    else:
+        w_list.wrappeditems = space.unpackiterable(w_iterable)
 
 def len__List(space, w_list):
     result = len(w_list.wrappeditems)



More information about the Pypy-commit mailing list