Jaymon / captain

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

define args in the main function #17

Closed Jaymon closed 8 years ago

Jaymon commented 8 years ago

allow you to set *_arg values, so you could do arg=[int] to make sure the *args values where all ints, likewise, you could do foo_arg, bar_arg and that would be positional arg 0 and 1, I think this would work ok and be ok, we could also make everything that ends in _kwarg be a named argument and everything that ends in _arg be a positional argument. Then *args and **kwargs would just be for everything else (the catchall).

Truthfully, I'm not sure how useful this would really be since you can use the @arg decorator to define all the args you need.