-
Notifications
You must be signed in to change notification settings - Fork 4
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
Visualization does not handle updates to a source file properly #163
Comments
As far as I can tell, two lists will be displayed for x = [1, 2, 3]
print(id(x))
print(id(x[:])) |
Yes, that's true. But in the lecture, I noticed that the visualization sometimes seems not to pick up the last changes to a file. Given the program x = [1,2,3]
y = x[:] it displayed one list with two arrows pointing to it from x and y (which is wrong). I think this was because I had the program x = [1,2,3]
y = x before, and the visualization still rendered the "old" program. Is this possible? |
This should only be possible if both versions of the code have the same MD5 hash and the version with The only thing that could have also happened is that you somehow had the old visualization still open, started the new visualization and somehow landed in the old tab (for whatever reason) as it won't be closed automatically. But I'm not sure how realistic that is. |
Can we (should we?) close the old visualization tab automatically? So that at most one visualization tab is visible? |
We can close the old visualization tab. But I'm not sure if we should. Keeping the old tab open leaves you with the option to open two tabs side by side for comparing some steps in case someone wants to do this. I'd personally not close the tab automatically. But ultimately, I'm open to whatever you think is the better solution. |
But the old visualization tab typically refers to code that is now no longer available. When we step through the old visualization, we highlight lines in a source file that might not correspond to the visualization at all. |
Hmm, yes, this is true. Maybe we should close it then as soon as we open a new one... |
Yes, I would prefer this solution. |
Given this program:
In todays lecture, I replaced
x[:]
withx
and back. But the visualization sometimes displays thiseven though the file contains
x
and it sometimes displaysalthough I wrote
x[:]
I could not determine a pattern for this behavior.
The text was updated successfully, but these errors were encountered: