-
-
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
deprecate whos
to varinfo
returning a markdown table. fixes #12131.
#24671
Conversation
3af49d1
to
6af5016
Compare
6af5016
to
17e18d4
Compare
And you didn't want Markdown parsing and formating in the base language 😛. |
And I don't want |
Maybe this could be called Also, maybe it should return a dictionary instead of just printing things out? In general returning seems more useful than printing. |
I guess instead of a dict it would be a EDIT: That prints out nicely as the above Markdown table! |
(Sorry, didn't look carefully enough: It does return the Markdown table. But maybe an indexable object is more useful.) |
I think for any serious use one should use |
I must say I feel uneasy about this design too. Returning a Markdown object really sounds like conflating contents and display. AFAIK that's the only place where we do that. Why not return a simple struct, with a custom method to print it as a Markdown table? This is what we do e.g. for (It would also make sense to have a generic type to hold lightweight tables like this, but time is a bit short to add this to 0.7.) |
I agree that returning a markdown object here is a bit weird. An option is that we can just document that as an interactive function whose return value is not particularly useful as data, this may change in the future. Then we can add a lightweight table type whenever we want to and return it here. On the whole, we're not going to freeze the behavior of interactive functionality because we really want to improve the interactive experience and as long as things that used to do something useful still do a similarly useful thing, people won't be too bothered. They don't really care about identical output for |
Yes, please remember what this function is really for. It's not for programmatically getting information about variables; it's terrible for that and always has been since before this it didn't even return anything. The only point of it is to provide this display, and returning a markdown table is a way to do that that works in multiple environments like ijulia. Since the purpose of this is display, it makes sense to return a display-oriented object. |
Classy, I say.