1. Pypy
  2. Untitled project
  3. pypy

Commits

Manuel Jacob  committed 3b5cdc4

Remove dict.__reversed__ SMM.

  • Participants
  • Parent commits ada1228
  • Branches remove-dict-smm

Comments (0)

Files changed (1)

File pypy/objspace/std/dictmultiobject.py

View file
         F: D[k] = F[k]"""
         init_or_update(space, self, __args__, 'dict.update')
 
-#    def descr_reversed(self, space):
-#        """"""
+    def descr_reversed(self, space):
+        raise OperationError(space.w_TypeError, space.wrap('argument to reversed() must be a sequence'))
 
 
 def _add_indirections():
 # ____________________________________________________________
 
 
-
-dict_reversed   = SMM('__reversed__',      1)
-
-def dict_reversed__ANY(space, w_dict):
-    raise OperationError(space.w_TypeError, space.wrap('argument to reversed() must be a sequence'))
-
 register_all(vars(), globals())
 
 def descr_fromkeys(space, w_type, w_keys, w_fill=None):
     popitem = gateway.interp2app(W_DictMultiObject.descr_popitem),
     setdefault = gateway.interp2app(W_DictMultiObject.descr_setdefault),
     update = gateway.interp2app(W_DictMultiObject.descr_update),
-    #reversed = gateway.interp2app(W_DictMultiObject.descr_reversed),
+    __reversed__ = gateway.interp2app(W_DictMultiObject.descr_reversed),
     )
 W_DictMultiObject.typedef.registermethods(globals())
 dict_typedef = W_DictMultiObject.typedef