[Python-Dev] Python 2.7b1 and argparse's version action (original) (raw)
Paul Moore p.f.moore at gmail.com
Mon Apr 19 14:31:33 CEST 2010
- Previous message: [Python-Dev] Python 2.7b1 and argparse's version action
- Next message: [Python-Dev] Python 2.7b1 and argparse's version action
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 19 April 2010 04:44, Ron Adam <rrr at ronadam.com> wrote:
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
Ironically, I'm forever mistakenly typing "python -v" to get the version. I'm not arguing that this is the "right" behaviour, just pointing out that it's neither unknown, nor entirely surprising to at least one user... As others have pointed out, there's a lot of hyperbole in this thread (not in Ron's post that I quoted, though).
If I were using argparse, which I almost certainly will in the future, I'd use the explicit parser.add_argument('--version', action='version', version='') form, so I have no interest in the default version argument - it can be deprecated, removed, kept the same or changed, it makes no difference to me.
Paul.
- Previous message: [Python-Dev] Python 2.7b1 and argparse's version action
- Next message: [Python-Dev] Python 2.7b1 and argparse's version action
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]