Larry Hastings <larry at hastings.org> wrote: > I just ran a quickie experiment and determined: when leaving a scope, > variables are deleted FIFO, aka in the same order they were created. > This surprised me; I'd expected them to be deleted LIFO, aka last > first. Why is it thus? Is this behavior an important feature or an > irrelevant side-effect? If you are talking about the locals in the scope of a function, it is an artifact of how the locals array is created. That is to say, the locals of a function are a flat array, and are decref'd in-order. That ordering is the original assignment ordering in the function, which is an artifact of how the compiler goes from local name -> FAST_LOCALS index. I don't believe it is an "important feature", but to decref in any other order would be silly and/or unintuitive. - Josiah
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4