Correct: REPL
moved out of base and into its own module.
You now have to write:
import REPL
using NumericIO
Base.display(r::REPL.REPLDisplay, v::Union{Float32,Float64}) = print(formatted(REPL.outstream(r.repl), :SI, ndigits=4), v)
Dangers of overwriting show()
I recommend against overwriting show()
as it is somewhat of a base function, and changing it might have unexpected repercussions in other modules elsewhere.
It is much safer to overwrite the Base.display()
function, as it applies only to results displayed to the REPL (aka Julia “console”). REPL output is meant for human consumption, and is not typically read back by machine.
For more details on the display/print/show/… call stack, you might want to take a look here:
(Note that display calls either print()
or show()
… but I did not draw it on that diagram).