Message134286
| Author |
Trundle |
| Recipients |
Trundle, bethard, eric.araujo, michael.foord, terry.reedy |
| Date |
2011年04月22日.23:51:12 |
| SpamBayes Score |
0.0005525106 |
| Marked as misclassified |
No |
| Message-id |
<1303516275.57.0.372298778118.issue11906@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
That happens because argparse uses `os.basename(sys.argv[0])` (per default) as program name, but `sys.argv[0]` is usually a string of length 0 at interactive sessions. The tests use ``"usage: {} ...".format(program_name)`` (note that there will be two spaces for an empty `program_name`) for the expected output, while argparse only outputs one space in that case. |
|