3 ms·
This statement returns a syntax error. But I get what you mean. For if (a := 1) or (b := 1): print(locals()) since a is truthy, it gets bound and is i
by linux2647 8y ago
This statement returns a syntax error. But I get what you mean. For
if (a := 1) or (b := 1):
print(locals())
since a is truthy, it gets bound and is in scope, whereas b is not, which makes sense to me.