-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Print general function documentation before that of its methods #13911
Comments
Edit: removed noise, as I was incorrect. That said, there's a lot of confusion about this at the moment. For example:
Aside/unhelpful: if you're doing something completely different use a different method name. |
Using "..."
function test end is the same as "..."
test apart from the first defining the function with 0 methods. Being able to write the general function docs above the more specific methods is nicer in some cases than having it only able to appear afterwards. Is there a problem with defining "dummy method definitions"?
Yes, they're attached to specific signatures. See
They're sorted using
It'll depend on the order in which modules are registered with |
Is there any way we can manually specify the order? Sometimes the order given by |
Mildly OT, but there isn't (and can't be) a strict order on types; note that type_morespecific(Float64, AbstractArray) == type_morespecific(AbstractArray, Float64) == false |
Prior to ac1ac74#diff-5a9ad42cbc2e070b47b9d63118501e2fR154 where |
@timholy @MichaelHatherly Thank you both, that's exactly what I was looking for. Is there anyone currently working on this, or are there any specific things I can help with to move this issue forward? |
I don't think so. I'll probably get around to it during next month when I've got some spare time.
We either need to sort the signatures of Line 270 in f228b83
Line 337 in f228b83
|
Closed by #15266 where the following ordering is now followed in, hopefully, all cases:
This should be the least surprising behaviour I think. @nalimilan, if you think this is worth mentioning in #15136 feel free to add it. |
Thanks, that should improve on the current status. I still wonder whether sorting by specificity might be a good idea too, but maybe that's not needed after all (since modules typically depends on another when extending a more general method). |
When printing the docs for a function, even though the methods are printed from the more general to more specific, the documentation for the function itself is printed last. It should probably be printed first.
The text was updated successfully, but these errors were encountered: