Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:

> These attributes exist; they're just not properties.

Yes, I see.  They're added to the instance in the constructor, so they don't 
exist as attributes of the class.  Also in that category:

BlockingIOError python is missing: ['characters_written']

That leaves:

RawIOBase C is missing: ['readinto', 'write']
StringIO C is missing: ['name']
StringIO python is missing: ['__getstate__', '__setstate__']
BytesIO python is missing: ['__setstate__']

The Python version of StringIO throws an AttributeException on the .name 
attribute.  It's a property inherited from the TextIOWrapper.  Effectively, 
TextIOWrapper provides the .name attribute if the object that it's wrapping 
provides the .name attribute.  This behavior is undocumented.

Is that reasonable behavior?  Or should TextIOWrapper define .name always and 
return some suitable value if the wrapped object doesn't define .name? (e.g., 
None)

In any case, it needs documentation.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9858>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to