[issue16399] argparse: append action with default list adds to list instead of overriding

paul j3 report at bugs.python.org
Thu Apr 4 04:21:12 CEST 2013


paul j3 added the comment:

The test file, test_argparse.py, has a test case for this:
'class TestOptionalsActionAppendWithDefault'

    argument_signatures = [Sig('--baz', action='append', default=['X'])]
    successes = [
        ('--baz a --baz b', NS(baz=['X', 'a', 'b'])),
    ]

----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16399>
_______________________________________


More information about the Python-bugs-list mailing list