Message193737
| Author |
paul.j3 |
| Recipients |
bethard, paul.j3, tshepang |
| Date |
2013年07月26日.20:20:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1374870050.31.0.0460672474295.issue14074@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This patch fixes the problem by joining the metavar terms with '|'. So the help for the test case (adapted from an existing tuple test) looks like:
usage: PROG [-h] W1 [W2 ...] [X1 [X2 ...]] Y1 Y2 Y3 [Z1]
positional arguments:
W1|W2 w
X1|X2 x
Y1|Y2|Y3 y
Z1 z
Alternatives include:
- use ',',' ',or '/' instead of '|'
- use just the 1st item of the tuple
- use the default (non-tuple) metavar in the help line
These all pass existing tests.
The last alternative would use:
#metavar = '|'.join(metavar)
if len(metavar)>1:
metavar = default
else:
metavar = metavar[0] |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年07月26日 20:20:50 | paul.j3 | set | recipients:
+ paul.j3, bethard, tshepang |
| 2013年07月26日 20:20:50 | paul.j3 | set | messageid: <1374870050.31.0.0460672474295.issue14074@psf.upfronthosting.co.za> |
| 2013年07月26日 20:20:50 | paul.j3 | link | issue14074 messages |
| 2013年07月26日 20:20:50 | paul.j3 | create |
|