Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

I have doubts that making _TemporaryFileWrapper a subclass of IOBase can make 
it simpler. It can make it more complex. _TemporaryFileWrapper is a proxy class 
with the __getattr__ method which not just return attributes of the underlying 
file, but wraps methods so they have references to the _TemporaryFileWrapper 
instance. If subclass IOBase you will need to write implementations of all 
methods of IOBase and its subclasses. You could also to reproduce the hierarhy 
of io classes to support binary and text, buffered and unbuffered files.

IDLE's pseudofiles are simpler because they represent only text files.

----------

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

Reply via email to