[Python-bugs-list] [ python-Bugs-526518 ] str(cStringIO.StringIO)
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 08 Mar 2002 03:39:21 -0800
Bugs item #526518, was opened at 2002-03-06 19:07
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=526518&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Walter Dörwald (doerwalter)
Assigned to: Jeremy Hylton (jhylton)
Summary: str(cStringIO.StringIO)
Initial Comment:
The module docstring for cStringIO states
that extracting the value of an output stream
is possible via str(). This doesn't seem to
work in Python 2.2:
>>> import cStringIO
>>> s = cStringIO.StringIO()
>>> s.write("foo")
>>> s.getvalue()
'foo'
>>> str(s)
'<cStringIO.StringO object at 0x8225110>'
----------------------------------------------------------------------
>Comment By: Walter Dörwald (doerwalter)
Date: 2002-03-08 12:39
Message:
Logged In: YES
user_id=89016
Here is the relevant line from the docstring:
"""
value=an_output_stream.getvalue() # str(an_output_stream)
works too!
"""
----------------------------------------------------------------------
Comment By: Jeremy Hylton (jhylton)
Date: 2002-03-08 02:00
Message:
Logged In: YES
user_id=31392
Can you quote exactly what in the module doc string says
that str() works? The code never worked this way, so I'll
fix the doc string if you tell me what to fix.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=526518&group_id=5470