I would like to have something like

merged_parser = LoggingParser() + OtherParser()

Which should create an argument parser with all the options composed.

Now for that I think I would need to subclass the argument, and something
fancy with the overloading.
The problem is that apparently there is no Argument class, but add_argument
just change the object internal data structures.

So the only alternative I see now is to do something like:
def add_project_argument(parser):
    parser.add_argument('project_path',
                        help='paths of the project to run')

which is not very neat and modifies the object in place.
Any other ideas?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to