[Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

Barry Warsaw barry at python.org
Tue Sep 11 21:08:26 CEST 2012


On Sep 11, 2012, at 12:19 PM, R. David Murray wrote:

>The 12776 fix isn't going to be in 3.3, so I don't think this is a
>pressing issue.  We can take our time to make sure we have the correct
>fix.  It is, however, a release blocker for 2.7.4, 3.2.4, and 3.3.1.

Are you sure about that?

% ./python
Python 3.3.0rc2+ (default:6fea947edead, Sep 11 2012, 15:03:16) 
[GCC 4.7.1 20120908 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import argparse
>>> p = argparse.ArgumentParser()
>>> p.add_argument('--test', dest='test', type=str, default=[], action='append')
_AppendAction(option_strings=['--test'], dest='test', nargs=None, const=None, default=[], type=<class 'str'>, choices=None, help=None, metavar=None)
>>> args = p.parse_args()
>>> args.test
'[]'


Cheers,
-Barry


More information about the Python-Dev mailing list