easyargs icon indicating copy to clipboard operation
easyargs copied to clipboard

subcommands are not required in Python 3

Open bauerj opened this issue 7 years ago • 0 comments

Using this example:

import easyargs

@easyargs
class Foo(object):
    """This is some help"""
    def foo(self):
        pass

    def bar(self, baz):
        pass

Foo()

Calling this from either Python 2.7 or 3.6 yields different results:

$ python2 example.py
usage: example.py [-h] {foo,bar} ...
example.py: error: too few arguments

$ python3 example.py

I think the output from Python 2.7 is the correct one. Supplying -h as an argument works in both cases.

bauerj avatar Jan 18 '18 21:01 bauerj