This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Typo in cStringIO
Type: behavior Stage:
Components: None Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, jmfauth
Priority: normal Keywords:

Created on 2010-03-12 10:14 by jmfauth, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg100920 - (view) Author: jmf (jmfauth) Date: 2010-03-12 10:14
There is a malformed string in the module cStringIO.

StringI <--> StringIO


>>> sys.version
2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
>>> StringIO.StringIO('123')
<StringIO.StringIO instance at 0x02D230D0>
>>> cStringIO.StringIO('123')
<cStringIO.StringI object at 0x0183ECB0>
>>>
msg100921 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-03-12 10:18
That name is actually correct.  cStringIO features two different types, depending on whether you call cStringIO.StringIO() with or without an argument.  One is called "StringI", the other "StringO".
msg100927 - (view) Author: jmf (jmfauth) Date: 2010-03-12 11:00
Wow! I never been aware of this (documentation, dir(), __doc__)
Indeed:

>>> cStringIO.StringIO()
<cStringIO.StringO object at 0x02D94F40>
>>> cStringIO.StringIO('abc')
<cStringIO.StringI object at 0x016DE920>

Sorry for the noise.
History
Date User Action Args
2022-04-11 14:56:58adminsetgithub: 52368
2010-03-12 11:00:20jmfauthsetmessages: + msg100927
2010-03-12 10:18:42georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg100921

resolution: not a bug
2010-03-12 10:14:44jmfauthcreate