Hi,
As an example, I am creating a simple Vector
prototype to do some geometric computation :
u = new Vector( [2, 4] )
the folded output is:
Vector { coords: Array(2) }
In this situation, the folded output gives no information about the actual object. It would be great to have the possibility to define a custom output format for an object. I think about the __repr__()
method in python. Maybe there is already a way around this I don’t know ? I have tried to change the toString()
method…
Similarly, sometimes the definition is more valuable than the output.
For example, here I want to plot the function y = f(x).
I would prefer to keep visible the definition only and not the output, which is a large unreadable array and provides me no more information than the graph.
Thanks for the work!! It is already a hard choice between Jupyter notebook&Python and Observable…