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

*args, **kwargs, Python 2.7 syntax? #15

Open
papadeltasierra opened this issue Apr 5, 2020 · 1 comment
Open

*args, **kwargs, Python 2.7 syntax? #15

papadeltasierra opened this issue Apr 5, 2020 · 1 comment

Comments

@papadeltasierra
Copy link

papadeltasierra commented Apr 5, 2020

Have I misunderstood PEP-484? It seems to imply that the correct syntax for type checking should be:

@typed(scope=Any, *args=Any, **kwargs=Any)
def method(scope, *args, **kwargs):
   pass

However this doesn't seem to work and I have to use

@typed(scope=Any, args=Any, kwargs=Any)
...
@papadeltasierra
Copy link
Author

papadeltasierra commented Apr 6, 2020

Umm, I did wonder whether it should actually be this

@typed(scope=Any, args=*Any, kwargs=**Any)

but that doesn't seem to work either.

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