[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2013-04-07 Thread Kostyantyn Leschenko

Kostyantyn Leschenko added the comment:

I've updated patch to work with current trunk.

--
nosy: +Kostyantyn.Leschenko, asvetlov
versions: +Python 3.4 -Python 3.2
Added file: http://bugs.python.org/file29704/Issue13249-5.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2013-04-07 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed in 4712f9f8a90d, 5e5081cdc086, e4beda7cca2f.
Thanks.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2013-04-03 Thread Mark Lawrence

Mark Lawrence added the comment:

Can someone please review the latest patch and commit if appropriate.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2012-07-23 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

I've updated the patch for the current trunk. Should be ready to commit.

--
Added file: http://bugs.python.org/file26490/Issue13249-4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-12-15 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

The ArgumentParser constructor is definitely only intended to be called with 
keyword arguments, so it's definitely a documentation bug that it doesn't say 
this. I haven't actually applied the patch, but the basic approach and wording 
look fine to me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-15 Thread Roy Smith

Roy Smith r...@panix.com added the comment:

Another patch, with the most recent review suggestions incorporated.

--
Added file: http://bugs.python.org/file23703/Issue13249-3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-14 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I would not use a note directive.  Notes and warnings distract and sometimes 
scare readers.  For a simple coding recommendation like this, I think a regular 
paragraph would suffice.  To make sure it’s not lost after pages of options 
description, maybe it could be put right after the signature?  Also, it would 
be nice to explicit the why of this recommendation (e.g. “due to the number of 
arguments, it is recommended to always use keyword arguments for this 
function”).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-14 Thread Roy Smith

Roy Smith r...@panix.com added the comment:

Before I build another patch, would you be OK with leaving it as a note, but 
adding the due to the number of arguments language?  There's a lot of text 
here, and people tend to just zoom in on the bits and pieces they need right 
now.  I think there is value in making this stand out as a note.

If you feel strongly this should not be a note, let me know and I'll change it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-14 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I agree with Eric both as to placement (first paragraph) and wording (with 
explanation). I don't have time to review otherwise at the moment.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-12 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks, I’ve made some comments on Rietveld.

 Added a recommendation to only use keywords, which seems sane given
 the number of arguments.
I looked for that but couldn’t find it.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-12 Thread Roy Smith

Roy Smith r...@panix.com added the comment:

New patch uploaded.

The added recommendation is around line 161 (look for 'Recommended usage is to 
only use keyword arguments')

--
Added file: http://bugs.python.org/file23667/Issue13249-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith

New submission from Roy Smith r...@panix.com:

The docs list the arguments in the order:

class argparse.ArgumentParser([description][, epilog][, prog]...

but the code (I'm looking at the 2.7.2 source) lists them as:

 class ArgumentParser(_AttributeHolder, _ActionsContainer):
   [...]
   def __init__(self,
 prog=None,
 usage=None,
 description=None,
 [...]

If you create a parser with just:

parser = argparse.ArgumentParser(foo)

you end up setting the 'prog' argument instead of the expected 'description'.  

It's unclear if the order in the code should be fixed to match the docs, or the 
order in the docs fixed to match the code, or just a note added to the docs 
saying you should not rely on positional argument ordering and always create a 
parser with named arguments.

--
components: Library (Lib)
messages: 146238
nosy: roysmith
priority: normal
severity: normal
status: open
title: argparse.ArgumentParser() lists arguments in the wrong order
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

in 3.x, same issue.
IMHO documentation should be fixed.

--
assignee:  - docs@python
components: +Documentation
nosy: +bethard, docs@python, flox
stage:  - needs patch
versions: +Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Petri Lehtinen

Petri Lehtinen pe...@digip.org added the comment:

Fixing the documentation is better, as changing the argument order would break 
existing code.

--
keywords: +easy
nosy: +petri.lehtinen

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

In the doc, the signature line is followed by a list of short descriptions in a 
third order. That perhaps should be changed to follow the same corrected order 
as the signature line. On the other hand, it matches the order of the detail 
sections that follow. On the third hand, that current order is confusing as it 
intermixes parameters that affect the help message behavior with those that 
affect the actual argument parsing behavior. I think these should be separated 
with one group following the other.

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith

Roy Smith r...@panix.com added the comment:

An Nth place is in the docstring:

Keyword Arguments:  

- prog -- The name of the program (default: sys.argv[0])

- usage -- A usage message (default: auto-generated from arguments) 

- description -- A description of what the program does 

- epilog -- Text following the argument descriptions

- parents -- Parsers whose arguments should be copied into this one 

- formatter_class -- HelpFormatter class for printing help messages 

- prefix_chars -- Characters that prefix optional arguments 

- fromfile_prefix_chars -- Characters that prefix files containing  

additional arguments

- argument_default -- The default value for all arguments   

- conflict_handler -- String indicating how to handle conflicts 

- add_help -- Add a -h/-help option

which omits 'version'.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith

Roy Smith r...@panix.com added the comment:

I'm working on a doc patch now...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith

Roy Smith r...@panix.com added the comment:

Patch attached.  I just deal with putting all the items into the same order, 
not terry.reedy's idea for separating them into two groups.

Added a recommendation to only use keywords, which seems sane given the number 
of arguments.

--
keywords: +patch
Added file: http://bugs.python.org/file23505/Issue13249.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith

Roy Smith r...@panix.com added the comment:

PS -- this is against the 2.7 branch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com