On Sun, May 26, 2019 at 8:38 AM Richard Damon <Richard at damon-family.org> wrote: > > On 5/25/19 5:09 PM, Nathaniel Smith wrote: > > a = locals() > > b = locals() > > # now our first "snapshot" has changed > > assert "a" in a > > > To me that is a static snapshot of a dynamic environment, not a dynamic > snapshot. The snapshot you get at THAT moment in time won't change, as > time progresses, so that snapshot itself isn't dynamic. Except that it does. After calling locals() a second time, the result of the *first* call will be updated to reflect changes. It's not a frozen snapshot; you can't diff the two dictionaries to see what's changed (unless you use "a = dict(locals())" or something, which IS a snapshot). >From my reading of the description, you could also "assert a is b" - is that correct? ChrisA
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