[issue28558] argparse Incorrect Handling of Store Actions

2016-10-29 Thread Xiang Zhang
Xiang Zhang added the comment: This is the expected behaviour. The doc explicitly says "Note that nargs=1 produces a list of one item. This is different from the default, in which the item is produced by itself". Read https://docs.python.org/3/library/argparse.html#nargs. -- nosy:

[issue28558] argparse Incorrect Handling of Store Actions

2016-10-29 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list

[issue28558] argparse Incorrect Handling of Store Actions

2016-10-29 Thread Chris
New submission from Chris: argparse does not handle Store actions correctly when "nargs = 1" is provided. The documentation indicates the value should be assigned to the dest, but instead a list with the value as the only item is assigned to dest. -- files: test_argparse.py messages: