On Sun, Apr 18, 2010 at 4:03 AM, Nick Coghlan <ncogh...@gmail.com> wrote: > To deal with this in a backwards compatible way while remaining on the > path to more conventional behaviour, I suggest the following: > > 1. For Python 2.7, deprecate *just* the "-v" default behaviour for the > version. This means "--version" and "-v" will be set to invoke different > actions when the version argument is supplied (the latter will trigger a > deprecation warning if supplied, while the former will work normally).
It's not clear how you would do this. If you can suggest a patch, I'd be happy to consider it. However, and the moment, you get "-v" and "--version" by simply specifying ArgumentParser(..., version="XXX"). So how do you deprecate just the "-v"? All I can imagine you mean is to issue a deprecation warning whenever a user of the script provides "-v" at the command line, but that seems sketchy to me - we'd be deprecating features of someone's *application*, not features of the argparse *library*. Steve -- Where did you get that preposterous hypothesis? Did Steve tell you that? --- The Hiphopopotamus _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com