Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subcommands are not required in Python 3 #15

Open
bauerj opened this issue Jan 18, 2018 · 0 comments
Open

subcommands are not required in Python 3 #15

bauerj opened this issue Jan 18, 2018 · 0 comments

Comments

@bauerj
Copy link

bauerj commented Jan 18, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant