Author: Richard Plangger <[email protected]>
Branch: py3.5
Changeset: r90399:6dd6cb21c7c9
Date: 2017-02-27 14:58 +0100
http://bitbucket.org/pypy/pypy/changeset/6dd6cb21c7c9/
Log: (mjacob, plan_rich) merge default
diff --git a/pypy/doc/objspace.rst b/pypy/doc/objspace.rst
--- a/pypy/doc/objspace.rst
+++ b/pypy/doc/objspace.rst
@@ -291,13 +291,9 @@
If :py:obj:`w_x` is an application-level integer or long, return an
interpreter-level
:py:class:`rbigint`. Otherwise raise :py:exc:`TypeError`.
+.. automethod:: pypy.interpreter.baseobjspace.ObjSpace.bytes_w(w_x)
.. automethod:: pypy.interpreter.baseobjspace.ObjSpace.text_w(w_x)
-.. py:function:: bytes_w(w_x)
-
- Takes an application level :py:class:`bytes` (PyPy2 this equals `str`) and
returns a rpython
- byte string.
-
.. py:function:: str_w(w_x)
**Deprecated. use text_w or bytes_w instead**
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1581,7 +1581,9 @@
return None if self.is_none(w_obj) else self.text_w(w_obj)
def bytes_w(self, w_obj):
- "Takes a bytes object and returns an unwrapped RPython bytestring."
+ """ Takes an application level :py:class:`bytes`
+ (on PyPy2 this equals `str`) and returns a rpython byte string.
+ """
return w_obj.bytes_w(self)
def text_w(self, w_obj):
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -1945,7 +1945,7 @@
class BytesListStrategy(ListStrategy):
import_from_mixin(AbstractUnwrappedStrategy)
- _none_value = None
+ _none_value = ""
def wrap(self, stringval):
return self.space.newbytes(stringval)
@@ -1977,7 +1977,7 @@
class UnicodeListStrategy(ListStrategy):
import_from_mixin(AbstractUnwrappedStrategy)
- _none_value = None
+ _none_value = u""
def wrap(self, stringval):
assert stringval is not None
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit