paul j3 added the comment:

This assertion has triggered several bug issues, either due to an empty group 
like this, or certain characters in the metavars.

http://bugs.python.org/issue17890
'argparse: mutually exclusive groups full of suppressed args can cause 
AssertionErrors'

http://bugs.python.org/issue11874 
'argparse assertion failure with brackets in metavars'

http://bugs.python.org/issue16360 
'argparse: comma in metavar causes assertion failure when formatting long usage 
message'

I think this is a duplicate of 17890, though I'll have to look more closely at 
your patch to see what it adds.

For 11874 I proposed a major rewrite of the usage formatting.  There I format 
each group and/or action separately, and keep the pieces in a list.  That way 
it's easier to filter out empty pieces, and avoids the complex split that gives 
headaches when the usage is long enough to wrap.

----------
nosy: +paul.j3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22363>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to