[issue24441] In argparse add_argument() allows the empty choices argument

2015-06-17 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue24441] In argparse add_argument() allows the empty choices argument

2015-06-12 Thread R. David Murray
R. David Murray added the comment: There's no real reason to throw an error here, and to do so would break backward compatibility and, arguably, functionality: someone autogenerating a choices list might depend on the empty list working. -- nosy: +r.david.murray resolution: -> rejecte

[issue24441] In argparse add_argument() allows the empty choices argument

2015-06-12 Thread py.user
New submission from py.user: A script, configuring argparse to have no choices: #!/usr/bin/env python3 import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', choices=[]) args = parser.parse_args() print(args) Running it: [guest@localhost args]$ ./t.py usage: t.py [-h