I read this part to mean 'yes':monele wrote:When we write python code directly in the scripts, does rollback work ?
...although as I understand it, rollback only rolls between renpy interaction points, so all that really typically means is that the state changes made by the python code are rolled back, as if a snapshot of the state before entering the python code had been taken.PyTom wrote:When compling a python block, when we encounter a list literal like [1, 2, 3], we need to call RollbackList to replace it with a rollback list. This is done transparently to the end user, when python blocks are compiled in renpy files.
(My mindset interprets rollback a little like a long series of nested COM+ transactions, each mousewheel up rolls back the innermost transaction, each renpy interaction creates a new one. I'm sure the code behind it is simpler than that, though, and of course it doesn't take into account rollforward.
... that said, a 'commit' might be an interesting, if bizarre, thing to have...