alexander-bauer/swirlypy

Decide on standard place for userdata

Closed this issue · 4 comments

There is a variable data passed between Questions within a Lesson, but it should not be used directly for storing user data. There should be a sub-variable within it to contain locals, and another for storing pristine data.

I've noticed that the experimental branch uses data directly for storing user data, @WilCrofter.

Another dictionary within data and called, say, userlocals instead?

In Recording.py, data["state"] (rather than data itself) now stores lesson variables which are correct up to the current shell question. Local variables for the current question are a deep copy of the correct state.

See above. Closing.