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

`s.kwonlydefaults` can be None #188

Open
gsmcwhirter opened this issue Apr 19, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@gsmcwhirter
Copy link

commented Apr 19, 2019

At

params.append("%s=%s" % (param, repr(s.kwonlydefaults[param])))
, the value of s.kwonlydefaults can apparently be None in the case where there are keyword-only args, and none of those keyword-only args have defaults (e.g., def foo(arg1, *, arg2, arg3). This raises a TypeError, not a KeyError. Perhaps it is worth adding the TypeError to the except clause?

kernc added a commit to pdoc3/pdoc that referenced this issue Apr 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.