Message341670
Why not make FileType instance also a context manager, so you could do something like:
with arguments.input as f:
assert arguments.input is f
For backwards compatibility, FileType would open eagerly as now, but it would be closed at exit from context manager.
We should just make sure we do not close stdout/stderr. |
|
Date |
User |
Action |
Args |
2019-05-07 02:51:00 | mitar | set | recipients:
+ mitar, bethard, eric.araujo, Paolo.Elvati, manveru, Stefan.Pfeiffer, paul.j3, David.Layton |
2019-05-07 02:51:00 | mitar | set | messageid: <1557197460.73.0.863734084016.issue13824@roundup.psfhosted.org> |
2019-05-07 02:51:00 | mitar | link | issue13824 messages |
2019-05-07 02:51:00 | mitar | create | |
|