【发布时间】:2011-06-25 17:16:06
【问题描述】:
python的io.BytesIO.getvalue()返回str而不是bytes正常吗?
Python 2.7.1 (r271:86832, Jun 13 2011, 14:28:51)
>>> import io
>>> a = io.BytesIO()
>>> a
<_io.BytesIO object at 0x10f9453b0>
>>> a.getvalue()
''
>>> print type(a.getvalue())
<type 'str'>
>>>
我应该提交错误吗?
【问题讨论】:
标签: python python-2.7