[ python-Feature Requests-1191420 ] cStringIO has reset(), but StringIO does not

SourceForge.net noreply at sourceforge.net
Thu Apr 28 06:57:16 CEST 2005


Feature Requests item #1191420, was opened at 2005-04-27 20:15
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1191420&group_id=5470

Category: Python Library
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Christopher Dunn (cxdunn)
Assigned to: Nobody/Anonymous (nobody)
Summary: cStringIO has reset(), but StringIO does not

Initial Comment:
from cStringIO import StringIO
s = StringIO()
s.reset()

from StringIO import StringIO
s = StringIO()
s.reset() # error!


reset() is not critical, since it just does the same
thing as seek(0), but cStringIO and StringIO are
supposed to be interchangeable.

-cxdunn

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2005-04-27 23:57

Message:
Logged In: YES 
user_id=80475

On the surface, it would seem like a good idea; however,
reset() was a mistake that should not be propagated.  The
API should be as file-like as possible.  Since there is no
file.reset(), there should not be a StringO.reset().

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1191420&group_id=5470


More information about the Python-bugs-list mailing list