[issue27227] argparse fails to parse [] when using choices and nargs='*'

2021-12-11 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue27227] argparse fails to parse [] when using choices and nargs='*'

2019-08-31 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27227] argparse fails to parse [] when using choices and nargs='*'

2018-04-26 Thread Freek Dijkstra
Freek Dijkstra added the comment: I don't think that this issue27227 and issue9625 are the same (although they may have the same root cause, and I would be in favour of fixing both issues). At least, I think the unit test are distinct: This issue27227 is that argparse does

[issue27227] argparse fails to parse [] when using choices and nargs='*'

2016-06-12 Thread Berker Peksag
Berker Peksag added the comment: Looking at this again, I think we should fix this in issue 9625. -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> argparse: Problem with defaults for variable nargs when using choices

[issue27227] argparse fails to parse [] when using choices and nargs='*'

2016-06-06 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> needs patch versions: -Python 3.4 ___ Python tracker ___

[issue27227] argparse fails to parse [] when using choices and nargs='*'

2016-06-05 Thread Evan
New submission from Evan: When using nargs='*' with choices, it is impossible to specify 0 args: from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('foo', choices=['foo'], nargs='*') args = parser.parse_args([]) # <-- fails, error message below assert args.foo ==