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: cStringIO.StringIO
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: exarkun, rhettinger
Priority: normal Keywords:

Created on 2003-05-10 01:49 by exarkun, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Messages (3)
msg15956 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2003-05-10 01:49
Instance of cStringIO.StringIO have no __class__ attribute.
Other built-in types, such as cPickle.Pickler, do.
msg15957 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-05-10 03:59
Logged In: YES 
user_id=80475

Which version are you using?  I don't see the same thing:

>>> a = cStringIO.StringIO('the quick')
>>> type(a)
<type 'cStringIO.StringI'>
>>> a.__class__
<type 'cStringIO.StringI'>
>>> b = cStringIO.StringIO()
>>> type(b)
<type 'cStringIO.StringO'>
>>> b.__class__
<type 'cStringIO.StringO'>
>>> dir(a)
['__class__', '__delattr__', '__doc__', '__getattribute__', '__h
ash__', '__init__', '__iter__', '__new__', '__reduce__', '__redu
ce_ex__', '__repr__', '__setattr__', '__str__', 'close', 'flush', 'g
etvalue', 'isatty', 'next', 'read', 'readline', 'readlines', 'reset', '
seek', 'tell', 'truncate']
>>> dir(b)
['__class__', '__delattr__', '__doc__', '__getattribute__', '__h
ash__', '__init__', '__iter__', '__new__', '__reduce__', '__redu
ce_ex__', '__repr__', '__setattr__', '__str__', 'close', 'flush', 'g
etvalue', 'isatty', 'next', 'read', 'readline', 'readlines', 'reset', '
seek', 'softspace', 'tell', 'truncate', 'write', 'writelines']
msg15958 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2003-05-12 00:28
Logged In: YES 
user_id=366566

2.2, apparently, though I thought I was using 2.3 at the time ;)  My mistake.
History
Date User Action Args
2022-04-10 16:08:41adminsetgithub: 38479
2003-05-10 01:49:40exarkuncreate