-
-
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
Show of parameterized methods #10794
Comments
Here's a simple patch that I like for handling this; see if you like it: diff --git a/base/methodshow.jl b/base/methodshow.jl
index e101dee..541a379 100644
--- a/base/methodshow.jl
+++ b/base/methodshow.jl
@@ -19,6 +19,9 @@ function argtype_decl(n, t) # -> (argname, argtype)
return s, string(t.parameters[1], "...")
end
end
+ if isa(t,DataType) && t === t.name.primary
+ return s, string(t.name)
+ end
return s, string(t)
end |
Yes, I think that is better but not perfect. Here the output now:
So the second I put together PR #10861 which should address this:
What do you think? An option would be to just print a space instead of the |
Below example shows that the method display does not make it clear whether the function parameter
T
features in theArray
parameter or not.for instance in
methods(call)
it looks like a lot of them are parametrized on the first argument but are not.Maybe display like this instead:
The text was updated successfully, but these errors were encountered: