[Python-bugs-list] [ python-Bugs-735535 ] cStringIO.StringIO

SourceForge.net noreply@sourceforge.net
Sun, 11 May 2003 17:28:45 -0700


Bugs item #735535, was opened at 2003-05-09 21:49
Message generated for change (Comment added) made by kuran
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=735535&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jp Calderone (kuran)
Assigned to: Nobody/Anonymous (nobody)
Summary: cStringIO.StringIO

Initial Comment:
Instance of cStringIO.StringIO have no __class__ attribute.
Other built-in types, such as cPickle.Pickler, do.


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

>Comment By: Jp Calderone (kuran)
Date: 2003-05-11 20:28

Message:
Logged In: YES 
user_id=366566

2.2, apparently, though I thought I was using 2.3 at the time ;)  My mistake.

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

Comment By: Raymond Hettinger (rhettinger)
Date: 2003-05-09 23:59

Message:
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']

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

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