Jaymon / captain

command line python scripts for humans
MIT License
13 stars 1 forks source link

add an inherit decorator #16

Closed Jaymon closed 8 years ago

Jaymon commented 8 years ago

So you could do something like this:

@arg("--che")
def main_foo(che):
    pass

@inherit(main_foo)
@arg("--baz")
def main_bar(baz):
    pass

which will make main_bar inherit all the arguments of main_foo on top of what it defines also.