Actually this is not what the kernel protocol specified; user_expressions
is a dictionary. So indeed if we want to preserve evaluation ordering, it will require changing the Kernel request or add a new on or clarify that keys order matters.
For now, here are examples of kernel replies:
Nominal case
{
"user_expressions": {
"jupyterlab-imarkdown-0": {
"status": "ok",
"data": {
"text/plain": "IntSlider(value=0, layout=Layout(display='inline-flex'))",
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "018244e845c941f886bb20d4c0975320"
}
},
"metadata": {}
}
}
}
Error case
{
"user_expressions": {
"jupyterlab-imarkdown-0": {
"status": "error",
"traceback": [
"\u001b[0;31mNameError\u001b[0m\u001b[0;31m:\u001b[0m name 'a' is not defined\n"
],
"ename": "NameError",
"evalue": "name 'a' is not defined"
}
}
}
So it looks like all the info are there (except the order although that could be enforced by ordering the dictionary keys).