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.

Author paul.j3
Recipients mohankumar, paul.j3
Date 2016-03-11.00:27:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457656036.14.0.750910917575.issue26503@psf.upfronthosting.co.za>
In-reply-to
Content
The usage line formatter needs a major rewrite.  

Currently it formats usage for all the arguments as one line (two actually, optionals and positionals are handled separately), and then breaks it into 'wrappable parts'.  It then compiles the lines from these parts

                # break usage into wrappable parts
                part_regexp = r'\(.*?\)+|\[.*?\]+|\S+'

So it's keeping things enclosed in brackets together, but allowing the 'required' arguments to be split.

Certain characters like [] in the metavars also break this usage.

http://bugs.python.org/issue11874  

has a patch with a usage rewrite hopefully will take care of this problem.  It collects the formatted arguments in a list rather than a concatenated string, so there's no need for this buggy splitter.
History
Date User Action Args
2016-03-11 00:27:16paul.j3setrecipients: + paul.j3, mohankumar
2016-03-11 00:27:16paul.j3setmessageid: <1457656036.14.0.750910917575.issue26503@psf.upfronthosting.co.za>
2016-03-11 00:27:16paul.j3linkissue26503 messages
2016-03-11 00:27:15paul.j3create