Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r73075:d5ad5952d919
Date: 2014-08-26 11:04 -0700
http://bitbucket.org/pypy/pypy/changeset/d5ad5952d919/
Log: kill realstr_w which is no longer used nor makes much sense on py3k
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1529,13 +1529,6 @@
"""
return w_obj.float_w(self, allow_conversion)
- def realstr_w(self, w_obj):
- # Like str_w, but only works if w_obj is really of type 'str'.
- if not self.isinstance_w(w_obj, self.w_str):
- raise OperationError(self.w_TypeError,
- self.wrap('argument must be a string'))
- return self.str_w(w_obj)
-
def unicode_w(self, w_obj):
return w_obj.unicode_w(self)
diff --git a/pypy/module/mmap/interp_mmap.py b/pypy/module/mmap/interp_mmap.py
--- a/pypy/module/mmap/interp_mmap.py
+++ b/pypy/module/mmap/interp_mmap.py
@@ -196,7 +196,7 @@
"mmap item value must be in range(0, 256)"))
self.mmap.setitem(start, chr(value))
else:
- value = space.realstr_w(w_value)
+ value = space.bytes_w(w_value)
if len(value) != length:
raise OperationError(space.w_ValueError,
space.wrap("mmap slice assignment is wrong size"))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit