[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2017-03-28 Thread paul j3

Changes by paul j3 :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2015-06-03 Thread paul j3

paul j3 added the comment:

And the corresponding bug issue

http://bugs.python.org/issue9351

--
nosy: +paul.j3

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



[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2015-06-03 Thread Rémi Rampin

Changes by Rémi Rampin remiram...@gmail.com:


--
nosy: +remram

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



[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2015-05-20 Thread Hao Huang

New submission from Hao Huang:

When I was trying to add the same argument to both the root command and the sub 
command and you put the arguments before the subcommand, In 2.7.8 the arguments 
would be parsed correctly. But in 2.7.9, they wouldn't but these arguments 
would show up in the help doc:(

For python2.7.8
~$ python2.7
Python 2.7.8 (default, Oct 29 2014, 13:45:48)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.
 import argparse

 parser = argparse.ArgumentParser()
 parser.add_argument(-s, dest=start)
_StoreAction(option_strings=['-s'], dest='start', nargs=None, const=None, 
default=None, type=None, choices=None, help=None, metavar=None)

 subparsers = parser.add_subparsers()
 subparser = subparsers.add_parser(command)
 subparser.add_argument(-s, dest=start)
_StoreAction(option_strings=['-s'], dest='start', nargs=None, const=None, 
default=None, type=None, choices=None, help=None, metavar=None)

 parser.parse_args([-s, 1, command])
Namespace(start='1')
 parser.parse_args([command, -s, 1])
Namespace(start='1')

For python 2.7.9
~$ python2.7
Python 2.7.9 (default, Apr 2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type help, copyright, credits or license for more information.
 import argparse
 parser = argparse.ArgumentParser()
 parser.add_argument(-s, dest=start)
_StoreAction(option_strings=['-s'], dest='start', nargs=None, const=None, 
default=None, type=None, choices=None, help=None, metavar=None)

 subparsers = parser.add_subparsers()
 subparser = subparsers.add_parser(command)
 subparser.add_argument(-s, dest=start)
_StoreAction(option_strings=['-s'], dest='start', nargs=None, const=None, 
default=None, type=None, choices=None, help=None, metavar=None)

 parser.parse_args([-s, 1, command])
Namespace(start=None)
 parser.parse_args([command, -s, 1])
Namespace(start='1')

--
components: Argument Clinic
messages: 243700
nosy: hhuang, larry
priority: normal
severity: normal
status: open
title: Different behavior for argparse between 2.7.8 and 2.7.9 when adding the 
same arguments to the root and the sub commands
type: behavior
versions: Python 2.7

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



[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2015-05-20 Thread Hao Huang

Hao Huang added the comment:

I think this patch cause the difference:
https://hg.python.org/cpython/rev/1a3143752db2

--

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



[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2015-05-20 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
components: +Library (Lib) -Argument Clinic
nosy: +bethard, r.david.murray -larry

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



[issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands

2015-05-20 Thread smparkes

Changes by smparkes smpar...@smparkes.net:


--
nosy: +smparkes

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