Message166068
So I generally agree that FileType is not what you want for anything but quick scripts that can afford to either leave a file open or to close stdin and/or stdout. However, quick scripts are an important use case for argparse, so I don't think we should get rid of FileType.
What should definitely happen:
* Someone should add some documentation explaining the risks of using FileType (e.g. forgetting to close the file, or closing stdin/stdout when you didn't mean to).
What could potentially happen if someone really wanted it:
* Someone could create a "safe" replacement, e.g. a FileOpenerType that returns an object with open() and close() methods that do the right things (or whatever API makes sense). |
|
Date |
User |
Action |
Args |
2012-07-21 21:01:09 | bethard | set | recipients:
+ bethard, eric.araujo, Paolo.Elvati, manveru, Stefan.Pfeiffer, David.Layton |
2012-07-21 21:01:09 | bethard | set | messageid: <1342904469.62.0.227464954844.issue13824@psf.upfronthosting.co.za> |
2012-07-21 21:01:09 | bethard | link | issue13824 messages |
2012-07-21 21:01:08 | bethard | create | |
|