4 ms·
nonlocal implies that you are reassigning a variable outside of the local scope. Your example works because you are mutating an existing object, not reassignin
by camel_Snake 8y ago
nonlocal implies that you are reassigning a variable outside of the local scope.
Your example works because you are mutating an existing object, not reassigning a new one.
It's a disingenuous comparison IMO.