-
Notifications
You must be signed in to change notification settings - Fork 27
Keyword only args #35
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
Conversation
2ccc4c0 to
92864e6
Compare
d87e4bc to
994851f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only looked the code and it looks fine except that it totally ignores kwonly args without defaults. An annoying thing with handling defaults in general is that the getfullargspec returns normal args and their possible defaults differently than kwonly args and their possible defaults. On Robot side this is handled so that ArgumentSpec has positional and kwonlyargs which both contain only argument names (i.e. are lists) and then separate defaults that is a mapping from argument name (either normal or kwonly) to their default value. Something like that, including similar ArgumentSpec object, could work here as well. Let's talk more on Slack!
I also added some comments related how the code possibly could be simplified.
Fixes #9