Author: Benjamin Peterson <[email protected]>
Branch: 
Changeset: r44604:4c06c942c459
Date: 2011-05-30 19:31 -0500
http://bitbucket.org/pypy/pypy/changeset/4c06c942c459/

Log:    using pos() for conjugate is beating around the bush and wrong on
        subclasses

diff --git a/pypy/objspace/std/floattype.py b/pypy/objspace/std/floattype.py
--- a/pypy/objspace/std/floattype.py
+++ b/pypy/objspace/std/floattype.py
@@ -15,7 +15,7 @@
 float_hex = SMM("hex", 1)
 
 def descr_conjugate(space, w_float):
-    return space.pos(w_float)
+    return space.float(w_float)
 
 register_all(vars(), globals())
 
diff --git a/pypy/objspace/std/inttype.py b/pypy/objspace/std/inttype.py
--- a/pypy/objspace/std/inttype.py
+++ b/pypy/objspace/std/inttype.py
@@ -13,7 +13,7 @@
 
 def descr_conjugate(space, w_int):
     "Returns self, the complex conjugate of any int."
-    return space.pos(w_int)
+    return space.int(w_int)
 
 def descr_bit_length(space, w_int):
     """int.bit_length() -> int
diff --git a/pypy/objspace/std/longtype.py b/pypy/objspace/std/longtype.py
--- a/pypy/objspace/std/longtype.py
+++ b/pypy/objspace/std/longtype.py
@@ -5,7 +5,7 @@
 from pypy.objspace.std.strutil import string_to_bigint, ParseStringError
 
 def descr_conjugate(space, w_int):
-    return space.pos(w_int)
+    return space.long(w_int)
 
 
 def descr__new__(space, w_longtype, w_x=0, w_base=gateway.NoneNotWrapped):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to