[pypy-svn] r5617 - pypy/trunk/src/pypy/objspace

mwh at codespeak.net mwh at codespeak.net
Thu Jul 22 18:00:40 CEST 2004


Author: mwh
Date: Thu Jul 22 18:00:39 2004
New Revision: 5617

Modified:
   pypy/trunk/src/pypy/objspace/descroperation.py
Log:
just putting some spaces in so i can read this function
(could happen quite a lot in this file, btw)


Modified: pypy/trunk/src/pypy/objspace/descroperation.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/descroperation.py	(original)
+++ pypy/trunk/src/pypy/objspace/descroperation.py	Thu Jul 22 18:00:39 2004
@@ -332,24 +332,24 @@
 
 # regular methods def helpers
 
-def _make_binop_impl(symbol,specialnames):
+def _make_binop_impl(symbol, specialnames):
     left, right = specialnames
-    def binop_impl(space,w_obj1,w_obj2):
+    def binop_impl(space, w_obj1, w_obj2):
         w_typ1 = space.type(w_obj1)
         w_typ2 = space.type(w_obj2)
-        w_left_impl = space.lookup(w_obj1,left)
-        if space.is_true(space.is_(w_typ1,w_typ2)):
+        w_left_impl = space.lookup(w_obj1, left)
+        if space.is_true(space.is_(w_typ1, w_typ2)):
             w_right_impl = None
         else:
-            w_right_impl = space.lookup(w_obj2,right)
-            if space.is_true(space.issubtype(w_typ1,w_typ2)):
-                w_obj1,w_obj2 = w_obj2,w_obj1
-                w_left_impl,w_right_impl = w_right_impl,w_left_impl
+            w_right_impl = space.lookup(w_obj2, right)
+            if space.is_true(space.issubtype(w_typ1, w_typ2)):
+                w_obj1, w_obj2 = w_obj2, w_obj1
+                w_left_impl, w_right_impl = w_right_impl, w_left_impl
 
-        w_res = _invoke_binop(space,w_left_impl,w_obj1,w_obj2)
+        w_res = _invoke_binop(space, w_left_impl, w_obj1, w_obj2)
         if w_res is not None:
             return w_res
-        w_res = _invoke_binop(space,w_right_impl,w_obj2,w_obj1)
+        w_res = _invoke_binop(space, w_right_impl, w_obj2, w_obj1)
         if w_res is not None:
             return w_res
         raise OperationError(space.w_TypeError,



More information about the Pypy-commit mailing list