[issue13538] Improve doc for str(bytesobject)

Antoine Pitrou report at bugs.python.org
Mon Oct 15 19:29:56 CEST 2012


Antoine Pitrou added the comment:

Indeed:

>>> m = memoryview(b"")
>>> str(m, "utf-8")
''
>>> m.decode("utf-8")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'memoryview' object has no attribute 'decode'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13538>
_______________________________________


More information about the Python-bugs-list mailing list