davidbrochart / akernel

Asynchronous Python Jupyter kernel
MIT License
72 stars 5 forks source link

Wrap already defined variables with X() #18

Closed davidbrochart closed 3 years ago

davidbrochart commented 3 years ago

Currently, an already defined variable a is not wrapped with ipyx.X(a), but kept as-is. It shouldn't be the case because then it means that y = a + 1 is not updated when a changes. This implies that all variables must be accessed with their .v attribute, not only when they are in the RHS of an assignment.

davidbrochart commented 3 years ago

I think an already defined variable shouldn't be wrapped, e.g. from math import pi should leave pi as-is, i.e. of type float. But a = 1 should wrap 1 with ipyx.X(1), so that variables depending on a change when a changes.