New submission from Joseph Birr-Pixton <jpix...@gmail.com>:

Say I have an argument with the name 'foo-bar'.  Argparse accepts and parses 
arguments, but Namespace does not allow me to access the value.

Yes, I can use getattr or Namespace.__dict__.  But that's ugly.
Yes, I can change the name of the argument, but that's not what I want in my 
help output.

I think it should either:
- Collapse names to valid python identifiers (optparse did this).
- Namespace should act like an object and dict.

----------
components: Library (Lib)
files: argparsetest.py
messages: 154550
nosy: Joseph.Birr-Pixton
priority: normal
severity: normal
status: open
title: Argparse usage model requires argument names to be python identifiers
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file24669/argparsetest.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14149>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to