[Patches] [ python-Patches-1774833 ] Convert str to bytes in io.BytesIO.__init__
SourceForge.net
noreply at sourceforge.net
Tue Aug 21 20:32:16 CEST 2007
Patches item #1774833, was opened at 2007-08-15 12:23
Message generated for change (Comment added) made by avassalotti
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1774833&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 3000
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Alexandre Vassalotti (avassalotti)
Assigned to: Nobody/Anonymous (nobody)
Summary: Convert str to bytes in io.BytesIO.__init__
Initial Comment:
This patch allows a str object to be used as the initial value of io.BytesIO:
>>> x = io.BytesIO('1234')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/alex/src/python.org/py3k/Lib/io.py", line 592, in __init__
buffer += initial_bytes
TypeError: can't concat bytes to str
----------------------------------------------------------------------
>Comment By: Alexandre Vassalotti (avassalotti)
Date: 2007-08-21 14:32
Message:
Logged In: YES
user_id=1826340
Originator: YES
Committed in r57263 in the alex-py3k branch, along with other fixes.
Closing.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1774833&group_id=5470
More information about the Patches
mailing list