Author paul.j3
Recipients arigo, paul.j3
Date 2013-09-07.02:13:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378520018.75.0.638727966888.issue18943@psf.upfronthosting.co.za>
In-reply-to
Content
A further complication on this.  With the arguments I defined in the previous post

    p.parse_args('--foo test --baz 257'.split())

gives the mutually exclusive error message.  `sys.argv` does the same.

    p.parse_args(['--foo', 'test', '--baz', '257'])

does not give an error, because here the 'test' argument string is the same as the default 'test'.  So the m_x_g test thinks `--foo' is the default, and does not count as an input.

Usually in testing an argparse setup I use the list and split arguments interchangeably, but this shows they are not equivalent.
History
Date User Action Args
2013-09-07 02:13:38paul.j3setrecipients: + paul.j3, arigo
2013-09-07 02:13:38paul.j3setmessageid: <1378520018.75.0.638727966888.issue18943@psf.upfronthosting.co.za>
2013-09-07 02:13:38paul.j3linkissue18943 messages
2013-09-07 02:13:38paul.j3create