Message212243
The addition of a simple decorator to the 'ArgumentParser' class, would simplify registering the tests:
def crosstest(self, func):
# decorator to facilitate adding these functions
name = func.__name__
self.register('cross_tests', name, func)
which would be used as:
@parser.crosstest
def pat_or_suf(parser, seen_actions, *args):
if 2==len(seen_actions.intersection([a_pat, a_suf])):
parser.error('only one of PATTERN and SUFFIX allowed') |
|
Date |
User |
Action |
Args |
2014-02-26 07:24:09 | paul.j3 | set | recipients:
+ paul.j3, bethard, xuanji, John.Didion, manveru |
2014-02-26 07:24:09 | paul.j3 | set | messageid: <1393399449.24.0.148703449699.issue11588@psf.upfronthosting.co.za> |
2014-02-26 07:24:09 | paul.j3 | link | issue11588 messages |
2014-02-26 07:24:08 | paul.j3 | create | |
|