The mime type of julia code, and it's usage in show and repr

I can’t find anything about it online, and there don’t seem to be any methods using it in julia, so I decided to ask here.

Something like text/julia (or maybe text/x-julia for standard compliance?) is what I would expect.

It would be useful to be able to use repr(x, "text/julia") to get a julia expression that evaluates to x. you can often get this with just show(x), but that doesn’t work for everything (eg. Base.TTY).

3 Likes

https://github.com/JuliaLang/julia/issues/26947

4 Likes