Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--foo-bar-baz is stored as foo_bar-baz and not foo_bar_baz #62

Closed
maxtaco opened this issue May 12, 2013 · 1 comment
Closed

--foo-bar-baz is stored as foo_bar-baz and not foo_bar_baz #62

maxtaco opened this issue May 12, 2013 · 1 comment

Comments

@maxtaco
Copy link
Contributor

maxtaco commented May 12, 2013

For hyphenated argument names, only the first hyphen is converted to an underscore, not all of them.

maxtaco added a commit to maxtaco/argparse that referenced this issue May 12, 2013
puzrin pushed a commit that referenced this issue May 12, 2013
@puzrin puzrin closed this as completed May 12, 2013
@hpaulj
Copy link

hpaulj commented May 13, 2013

I wonder why this replacement is not done on positional dest. It's not done in the python code, where in some ways it matters more.

In the javascript Namespace, if you can't use ns.foo-bar-baz you can still use ns['foo-bar-baz']. But with the python Namespace you have to use getattr(ns, 'foo-bar-baz').

Maybe this needs an issue report in both versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants