On Sun, Apr 18, 2010 at 4:03 AM, Nick Coghlan <ncoghlan at 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4