← 输入框|bugs.python.org|刷新

➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 paul.j3
收信人 Yogesh.Chaudhari, gholms, paul.j3
日期 2013-05-03.05:23:25
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1367558605.66.0.672960155093.issue17890@psf.upfronthosting.co.za>
In-reply-to
内容
In the test case: class TestMutuallyExclusiveManySuppressed
even with a short 'eggs' argument, there is a difference

Old usage would be:

usage: PROG [-h]  [--eggs EGGS]

new

usage: PROG [-h] [--eggs EGGS]

i.e. 2 v 1 space.  But extra spaces are not as dramatic a failure as an assertion error.

It would also be good to check what happens when there are 2 suppressed groups.  If the text before all trimming is:

[ -h ] [] () [ --eggs EGGS ]

does it reduce to?

[-h] [--eggs EGGS]

The old code would have left 3 spaces.

I can't think of a situation in which a user would want a (generated) usage line with multiple spaces.  If some sort of special formatting is needed, there is always the option of specifying an explicit usage line.

parser = ArugmentParser(usage='one \ttwo  \nthree   four')
历史
日期 用户 动作 参数
2013-05-03 05:23:25paul.j3修改recipients: + paul.j3, Yogesh.Chaudhari, gholms
2013-05-03 05:23:25paul.j3修改messageid: <1367558605.66.0.672960155093.issue17890@psf.upfronthosting.co.za>
2013-05-03 05:23:25paul.j3链接issue17890 messages
2013-05-03 05:23:25paul.j3创建