Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r56160:cfcec2372ef0
Date: 2012-07-18 16:10 +0200
http://bitbucket.org/pypy/pypy/changeset/cfcec2372ef0/
Log: we no longer have objects of type w_str, kill the corresponding code
paths
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
@@ -33,13 +33,6 @@
if space.is_w(w_floattype, space.w_float):
return w_obj
value = space.float_w(w_obj)
- elif space.isinstance_w(w_value, space.w_str):
- strvalue = space.str_w(w_value)
- try:
- value = string_to_float(strvalue)
- except ParseStringError, e:
- raise OperationError(space.w_ValueError,
- space.wrap(e.msg))
elif space.isinstance_w(w_value, space.w_unicode):
if space.config.objspace.std.withropeunicode:
from pypy.objspace.std.ropeunicodeobject import
unicode_to_decimal_w
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
@@ -24,8 +24,6 @@
return w_value
elif type(w_value) is W_LongObject:
return newbigint(space, w_longtype, w_value.num)
- elif space.isinstance_w(w_value, space.w_str):
- return string_to_w_long(space, w_longtype, space.str_w(w_value))
elif space.isinstance_w(w_value, space.w_unicode):
if space.config.objspace.std.withropeunicode:
from pypy.objspace.std.ropeunicodeobject import
unicode_to_decimal_w
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit