Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update value of displayed variable which is also set atomically in the same cell #31

Open
psychemedia opened this issue Dec 12, 2018 · 2 comments

Comments

@psychemedia
Copy link

One of the demos folk use to show how trad kernel state differs from cell output is to show that the output from a cell of the form:

a=1
a

is incorrect if you update a.

But in reactivepy kernel, if I update a then the output of the original cell can become nonsense...

reactivepy

I suspect folk who have a reason for why notebooks don't work in their situation will pick up on this.

@psychemedia
Copy link
Author

FWIW, I'm not saying above behaviour is incorrect; just that docs should be upfront about the possibility / likelihood of situations like the above occurring and providing a straightforward way of interpreting that sort of situation (eg "this situation shows that the state of a has been changed elsewhere in the notebook since this cell was executed". It also makes the point that the cell is NOT executed? And makes me think - would it be useful to record the output of the cell when it is run for the first time, in order, from a fresh kernel, in metadata?)

In terms of advocacy, comparing "pathological" situations in reactivepy or simple Python kernel with the corresponding behaviour using the other / complementary kernel might be useful.

@pelson
Copy link

pelson commented Dec 31, 2018

I just tried doing this in the binder examples, and now get a RedefiningOwnedCellException exception - it seems you can't re-define variables if they are defined in earlier cells. Looks like this has been a feature for a while though (#10), so not sure if I've missed a key point here @psychemedia?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants