Message358253
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. |
|
Date |
User |
Action |
Args |
2019-12-11 07:03:02 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, asvetlov, martin.panter, wumpus, Dutcho, sergiitk |
2019-12-11 07:03:01 | serhiy.storchaka | set | messageid: <1576047781.95.0.675069806104.issue33762@roundup.psfhosted.org> |
2019-12-11 07:03:01 | serhiy.storchaka | link | issue33762 messages |
2019-12-11 07:03:01 | serhiy.storchaka | create | |
|