classification
Title: argparse FAQ: how it is different from optparse
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.5, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: berker.peksag Nosy List: Anastasia.Filatova, asvetlov, berker.peksag, bethard, docs@python, eric.araujo, ezio.melotti, python-dev, rhettinger, techtonik, tshepang
Priority: normal Keywords: easy, patch

Created on 2013-03-18 16:42 by techtonik, last changed 2014-09-26 12:40 by berker.peksag. This issue is now closed.

Files
File name Uploaded Description Edit
Issue17462_py27.patch Anastasia.Filatova, 2014-03-18 11:17 review
Issue17462_py33.patch Anastasia.Filatova, 2014-03-18 11:20 review
Issue17462_py34.patch Anastasia.Filatova, 2014-03-18 11:22 review
Messages (12)
msg184468 - (view) Author: anatoly techtonik (techtonik) Date: 2013-03-18 16:42
http://stackoverflow.com/questions/3217673/why-use-argparse-rather-than-optparse

Too many votes. This should be confirmed by the official documentation.
msg184469 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2013-03-18 16:43
The patch is welcome
msg184470 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-03-18 16:47
Is http://docs.python.org/dev/library/argparse.html#upgrading-optparse-code not enough?
msg184471 - (view) Author: anatoly techtonik (techtonik) Date: 2013-03-18 16:54
@asvetlov: I still don't have the answer which licence - Academic Free License v2.1 or Apache 2.0 should I choose to license my patches. What is the difference?

Ezio: It explains what you should replace, but doesn't explain why.
msg184602 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-03-19 06:45
Indeed a paragraph about it could be added at the beginning.
msg213956 - (view) Author: (Anastasia.Filatova) * Date: 2014-03-18 11:17
Now argparse documentation includes a paragraph about advantages of argparse module over optparse module.
msg213957 - (view) Author: √Čric Araujo (eric.araujo) * (Python committer) Date: 2014-03-18 13:39
Thanks for the patch, will apply.
msg221048 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-06-19 23:06
Patch LGTM.
msg221148 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-06-21 02:55
Thanks for the patch.  It reads well and is informative.
msg227610 - (view) Author: Roundup Robot (python-dev) Date: 2014-09-26 12:34
New changeset 84313c61e60d by Berker Peksag in branch '3.4':
Issue #17462: Add a paragraph about advantages of argparse over optparse.
https://hg.python.org/cpython/rev/84313c61e60d

New changeset 45e1c0029aff by Berker Peksag in branch 'default':
Issue #17462: Add a paragraph about advantages of argparse over optparse.
https://hg.python.org/cpython/rev/45e1c0029aff
msg227612 - (view) Author: Roundup Robot (python-dev) Date: 2014-09-26 12:38
New changeset 4eb847e7ddde by Berker Peksag in branch '2.7':
Issue #17462: Add a paragraph about advantages of argparse over optparse.
https://hg.python.org/cpython/rev/4eb847e7ddde
msg227613 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2014-09-26 12:40
Thanks for the patch, Anastasia.
History
Date User Action Args
2014-09-26 12:40:25berker.peksagsetstatus: open -> closed

assignee: eric.araujo -> berker.peksag

keywords: + easy
nosy: + berker.peksag
messages: + msg227613
resolution: fixed
stage: commit review -> resolved
2014-09-26 12:38:58python-devsetmessages: + msg227612
2014-09-26 12:34:55python-devsetnosy: + python-dev
messages: + msg227610
2014-06-21 02:55:30rhettingersetnosy: + rhettinger
messages: + msg221148
2014-06-19 23:06:10ezio.melottisetmessages: + msg221048
versions: + Python 3.5, - Python 3.3
2014-03-18 13:39:38eric.araujosetassignee: docs@python -> eric.araujo
messages: + msg213957
stage: needs patch -> commit review
2014-03-18 11:22:46Anastasia.Filatovasetfiles: + Issue17462_py34.patch
2014-03-18 11:20:27Anastasia.Filatovasetfiles: + Issue17462_py33.patch
2014-03-18 11:17:57Anastasia.Filatovasetfiles: + Issue17462_py27.patch

nosy: + Anastasia.Filatova
messages: + msg213956

keywords: + patch
2014-03-15 00:34:40eric.araujosetnosy: + eric.araujo

versions: - Python 3.2
2013-03-22 19:02:53tshepangsetnosy: + tshepang
2013-03-19 06:45:25ezio.melottisetversions: + Python 3.2, Python 3.4
nosy: + bethard

messages: + msg184602

type: enhancement
stage: needs patch
2013-03-18 16:54:57techtoniksetmessages: + msg184471
versions: + Python 2.7, Python 3.3
2013-03-18 16:47:32ezio.melottisetnosy: + ezio.melotti
messages: + msg184470
2013-03-18 16:43:50asvetlovsetnosy: + asvetlov
messages: + msg184469
2013-03-18 16:42:28techtonikcreate