-
Notifications
You must be signed in to change notification settings - Fork 31
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
Should TYPEDSIGNATURES
include types for keyword arguments?
#97
Comments
Along those lines, it might also make sense to not show type annotations for arguments whose type is |
I have to double check if this is the case but I think keyword argument types were not part of the Julia docstrings
I think this makes sense. |
Yeah, looks like the current docs code omits the types of keyword arguments, and (incorrectly, AFAICS) refers to them as "optional" arguments. |
It looks like the docs question might be partly (but not completely, I think) coupled with decisions about how Julia dispatches on keyword arguments, as in e.g. JuliaLang/julia#34514 (comment). Thanks @kdheepak for looking into it. |
Yes, correct. We never bothered storing anything related to keywords since they don't really play a part in dispatch in the usual way. Extracting the keyword arg types from the method objects should be possible, though I've not looked into that in a while.
Seems reasonable to me. |
I find it very helpful to include
$(TYPEDSIGNATURES)
at the top of my function docstring template. I'm wondering why type annotations are included in positional arguments but not keyword arguments? I would have expected/preferred to have type annotations appear in the docstring everywhere that they appear in the actual function signature. That's how it was in the initial proposal in #20, and I haven't been able to find any further discussion on the topic.The text was updated successfully, but these errors were encountered: