-
-
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
Clarify that repr
should make julia code
#30757
Conversation
Is
|
Everything is overloadable in Julia. I think yes, the guidance of having something like |
I believe that's enough different output formats, and there is no real use for |
The one main exception to that is it's sometimes ok to directly define |
I like those pair definitions. Anyway, outcome of this discussion is that
|
I agree with those proposed edits.
We have that, as |
my wonders are about clarity. Until you mentioned it it was not obvious to me that it was a core part of the definition of I mean I knew they did that. But I thought of it as a fallback behavour not as core to what they were. |
@JeffBezanson How about adding |
That might be ok, but that would mean you have a type where it's possible to show it in a parseable way, but |
I should add that we are not really strict about |
One of the reason is that It's also discussed in https://discourse.julialang.org/t/how-to-detect-in-show-that-you-are-computing-display-for-the-repl/18951
One thing I have in mind is example-based testing like doctest. It'd be useful if I can dump the |
Bump? Seems like a helpful docstring improvement as is :) |
It needs to be moved to be on the |
This issue has been open for a while, Its it worth keeping it open or can it be closed? Matt. |
It is still valid last I checked. |
Looks like there are some proposed other updates (#30757 (comment)), but the specific changes proposed here were not in line with the behavior expected of this function |
The docs currently are descriptive, they say "this usually make",
this changers them to be perscriptive, saying "this should make".
A problem with this is that the docstring under this PR is now written to be read by an implementer,
not by a user.
An alternative would be to put this presriptive statment in a Note to Implementors
bit at the bottom.
Here is the equivalent python docs
@omus this is re: our discussion yesterday.