l74d/scoping

`scoping.keep()`: not sure how it works?

Closed this issue · 2 comments

Could you provide a working example of how to use scoping.keep() in the README.md?

Nevermind, I can't read...

l74d commented

Just in case anyone else searched and ended up on this page:

with scoping():
    b = 4
    scoping.keep('b')  #The name of the variable to be "kept" needs to be passed as a string to keep() 
assert(4 == b)

I wish it could be

scoping.keep(b)

without the quotes, but I am yet to find out a simple way to do that.