[pypy-svn] r37777 - pypy/dist/pypy/objspace/std
cfbolz at codespeak.net
cfbolz at codespeak.net
Fri Feb 2 00:13:51 CET 2007
Author: cfbolz
Date: Fri Feb 2 00:13:51 2007
New Revision: 37777
Modified:
pypy/dist/pypy/objspace/std/listobject.py
pypy/dist/pypy/objspace/std/listtype.py
Log:
remove old commented out code
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:13:51 2007
@@ -81,15 +81,6 @@
def add__List_List(space, w_list1, w_list2):
return W_ListObject(w_list1.wrappeditems + w_list2.wrappeditems)
-#def radd__List_List(space, w_list1, w_list2):
-# return W_ListObject(w_list2.wrappeditems + w_list1.wrappeditems)
-
-##def add__List_ANY(space, w_list, w_any):
-## if space.is_true(space.isinstance(w_any, space.w_list)):
-## items1_w = w_list.wrappeditems
-## items2_w = space.unpackiterable(w_any)
-## return W_ListObject(items1_w + items2_w)
-## raise FailedToImplement
def inplace_add__List_ANY(space, w_list1, w_iterable2):
list_extend__List_ANY(space, w_list1, w_iterable2)
@@ -139,14 +130,6 @@
return space.w_False
i += 1
return space.w_True
- #return space.newbool(len(w_list1.wrappeditems) == len(w_list2.wrappeditems))
-
-##def eq__List_ANY(space, w_list1, w_any):
-## if space.is_true(space.isinstance(w_any, space.w_list)):
-## items1_w = w_list1.wrappeditems
-## items2_w = space.unpackiterable(w_any)
-## return equal_wrappeditems(space, items1_w, items2_w)
-## raise FailedToImplement
def _min(a, b):
if a < b:
@@ -183,26 +166,10 @@
return lessthan_unwrappeditems(space, w_list1.wrappeditems,
w_list2.wrappeditems)
-##def lt__List_ANY(space, w_list1, w_any):
-## # XXX: Implement it not unpacking all the elements
-## if space.is_true(space.isinstance(w_any, space.w_list)):
-## items1_w = w_list1.wrappeditems
-## items2_w = space.unpackiterable(w_any)
-## return lessthan_unwrappeditems(space, items1_w, items2_w)
-## raise FailedToImplement
-
def gt__List_List(space, w_list1, w_list2):
return greaterthan_unwrappeditems(space, w_list1.wrappeditems,
w_list2.wrappeditems)
-##def gt__List_ANY(space, w_list1, w_any):
-## # XXX: Implement it not unpacking all the elements
-## if space.is_true(space.isinstance(w_any, space.w_list)):
-## items1_w = w_list1.wrappeditems
-## items2_w = space.unpackiterable(w_any)
-## return greaterthan_unwrappeditems(space, items1_w, items2_w)
-## raise FailedToImplement
-
def delitem__List_ANY(space, w_list, w_idx):
idx = space.int_w(w_idx)
try:
Modified: pypy/dist/pypy/objspace/std/listtype.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listtype.py (original)
+++ pypy/dist/pypy/objspace/std/listtype.py Fri Feb 2 00:13:51 2007
@@ -30,16 +30,7 @@
list_reversed = SMM('__reversed__', 1,
doc='L.__reversed__() -- return a reverse iterator over'
' the list')
-##
-##list_reversed__ANY = gateway.applevel('''
-## # NOT_RPYTHON -- uses yield
-##
-## def reversed(lst):
-## return iter([x for x in lst[::-1]])
-## # for index in range(len(lst)-1, -1, -1):
-## # yield lst[index]
-##
-##''', filename=__file__).interphook('reversed')
+
def list_reversed__ANY(space, w_list):
from pypy.objspace.std.iterobject import W_ReverseSeqIterObject
return W_ReverseSeqIterObject(space, w_list, -1)
More information about the pypy-svn
mailing list