paul j3 added the comment:

Attached is a patch for 3.5.0 dev that adds UsageGroups.  Now different 'kinds' 
are implemented as subclasses, which are accessed via the registry:

     _XorUsageGroup - replicate action of MutuallyExclusiveGroups
     _AndUsageGroup - an inclusive group
     _OrUsageGroup -  an 'any' group
     _NorUsageGroup - NotOr - also works as Not
     _NandUsageGroup - NotAnd

Open issues:

    - what difference should the 'required' parameter make?
    - how should 'errors' in nested groups propagate?
    - formatting of error messages
    - formatting the usage line with these groups
    - any additional 'help' display
    - framework for custom test and/or subclasses
    - documentation, sample scripts, and formal testing

----------
Added file: http://bugs.python.org/file36553/usage_2.patch

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

Reply via email to