This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bethard
Recipients David.Layton, Paolo.Elvati, Stefan.Pfeiffer, bethard, eric.araujo, manveru
Date 2012-07-21.21:01:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:09bethardsetrecipients: + bethard, eric.araujo, Paolo.Elvati, manveru, Stefan.Pfeiffer, David.Layton
2012-07-21 21:01:09bethardsetmessageid: <>
2012-07-21 21:01:09bethardlinkissue13824 messages
2012-07-21 21:01:08bethardcreate