Title: argparse: Namespace can contain critical characters
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.3
Status: closed Resolution: duplicate
Dependencies: Superseder: argparse: positional arguments containing - in name not handled well
View: 15125
Assigned To: Nosy List: Sworddragon
Priority: normal Keywords:

Created on 2013-05-27 22:25 by Sworddragon, last changed 2013-05-28 00:14 by r.david.murray. This issue is now closed.

File name Uploaded Description Edit Sworddragon, 2013-05-27 22:25 Example script
Messages (2)
msg190157 - (view) Author: (Sworddragon) Date: 2013-05-27 22:25
Positional arguments which have no dest attribute doesn't replace any - with _. In the attachments is an example script which demonstrate this. The output looks like this:

sworddragon@ubuntu:~$ ./ foo
Namespace(foo-bar2='foo', foo_bar1=None)
msg190160 - (view) Author: (Sworddragon) Date: 2013-05-27 23:11
I have found another report about this:
Date User Action Args
2013-05-28 00:14:10r.david.murraysetsuperseder: argparse: positional arguments containing - in name not handled well
2013-05-27 23:12:35Sworddragonsettype: behavior
2013-05-27 23:11:43Sworddragonsetstatus: open -> closed
resolution: duplicate
messages: + msg190160
2013-05-27 22:25:16Sworddragoncreate