Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r58769:01db4d55f6a2
Date: 2012-11-06 13:11 -0800
http://bitbucket.org/pypy/pypy/changeset/01db4d55f6a2/
Log: translation fixes
diff --git a/pypy/objspace/std/complextype.py b/pypy/objspace/std/complextype.py
--- a/pypy/objspace/std/complextype.py
+++ b/pypy/objspace/std/complextype.py
@@ -197,7 +197,6 @@
# __complex__() must return a complex or (float,int,long) object
# (XXX should not use isinstance here)
if not strict_typing and (space.isinstance_w(w_z, space.w_int) or
- space.isinstance_w(w_z, space.w_long) or
space.isinstance_w(w_z, space.w_float)):
return (space.float_w(w_z), 0.0)
elif isinstance(w_z, W_ComplexObject):
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
@@ -39,7 +39,7 @@
space.isinstance_w(w_value, space.w_bytearray)):
strvalue = space.bufferstr_w(w_value)
try:
- value = string_to_float(strvalue)
+ value = string_to_float(strvalue.decode('latin-1'))
except ParseStringError, e:
raise OperationError(space.w_ValueError,
space.wrap(e.msg))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit