[Python-3000] StringIO vs cStringIO, pickle vs cPickle
Aahz
aahz at pythoncraft.com
Tue Apr 4 16:17:59 CEST 2006
On Tue, Apr 04, 2006, Just van Rossum wrote:
>
> Has there been any discussion yet about StringIO vs cStringIO and pickle
> vs cPickle?
Now there is!
> While I appreciate that there are maintained pure Python versions of
> those modules, as a user it irritates me that I have the choice. The
> argument so far for not replacing StringIO with cStringIO was that
> they're subtly incompatible (mostly StringIO's "feature" to support
> unicode, right?), so Python 3000 seems like a good time to reconsider
> that option. I don't see any reason to not always want to prefer the
> faster version.
Suggestion: make string_io (we're renaming the module, right?) and pickle
contain a UserStringIO and UserPickle class. Alternatively, they could
be moved wholesale into a python_types module, where we collectively
maintain Python versions of *all* Python types, including lists and
tuples.
IOW, I do argue for keeping the Python code somehow, and keeping them
officially maintained. Obviously it gets a little absurd with lists and
numbers, for example, but I think that showing off good use of __new__
would be a Good Thing.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"Look, it's your affair if you want to play with five people, but don't
go calling it doubles." --John Cleese anticipates Usenet
More information about the Python-3000
mailing list