Steven Bethard schrieb: > 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). > > [...] > > 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*.
It would raise warnings when the option is /used/ (rather than defined; such warnings address programmers, though), and it wouldn't free '-v' for other uses. I agree that this would be more complicated than necessary. It would be better to just drop the default usage of '-v'. This way we wouldn't need a deprecation procedure either. -- Tobias _______________________________________________ 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