-
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
Default argument value in function documentation #107
Comments
I recall trying to add this a long time ago, works well for the small cases such as numbers and the like, but as soon as you have a default value being some kind of complex nested object the info becomes more of a hindrance than a help. Would need some kind of display limiting if we tried this again. |
+1 on this. Having the defaults in the signatures is very important. I think 98% of the time, the defaults are simple things like integers, short strings, bools, etc. Converting the default to a string and having a maximum length with a "..." at the end if it exceeds that should cover the vast majority of the cases, I'd think. I'd do it myself but I have no idea how to even get the default. :) Cudos to making this package. |
It's possible to retrieve default argument values, it's just probably going to require digging into the output of |
Is there some technical obstacle with saving the documented expression? The expression seems to be very valuable information. |
#133 is intended to add support for this kind of thing. I just need some spare time to actually finish it off though. |
Awesome! BTW let me take this opportunity to thank you for all the great work you did on the julia documentation system @MichaelHatherly |
Thanks @JanWeidnerPTW! |
I'll probably merge #133 sometime thing week, after which it's just a matter of using the feature to implement a fix for this one. |
Could you elaborate a bit on that? It's not clear to me how to get the expression into an |
Define an
|
Consider the following documentation for a function
f1
in a moduleCGP
The generated documentation is
Two signatures are produced, but information of the default value is lost. I have to document the default value of
b
manually.Is it possible to produce a single signature that contains the default value? Something like follows
The text was updated successfully, but these errors were encountered: