A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-April/099549.html below:

[Python-Dev] Python 2.7b1 and argparse's version action

[Python-Dev] Python 2.7b1 and argparse's version action [Python-Dev] Python 2.7b1 and argparse's version actionRon Adam rrr at ronadam.com
Mon Apr 19 05:44:29 CEST 2010
On 04/18/2010 05:57 PM, Nick Coghlan wrote:
> Steven Bethard wrote:
>> By the way, we could simplify the typical add_argument usage by adding
>> "show program's version number and exit" as the default help for the
>> 'version' action. Then you should just write:
>>
>>      parser.add_argument('--version', action='version', version='<the version>')
>
> With that change, I would have no problem with the current argparse
> behaviour (since doing it this way makes it very easy for people to add
> a "-V" shortcut if they want one).


+1   This sounds good to me also.


Note that the python interpreter uses -V and --version.

ra at Gutsy:~$ python3.1 -V
Python 3.1.2
ra at Gutsy:~$ python3.1 --version
Python 3.1.2

And -v is used as follows:

-v     : verbose (trace import statements); also PYTHONVERBOSE=x
          can be supplied multiple times to increase verbosity

Ron





More information about the Python-Dev mailing list

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