NOTE: Please read the full question before tagging this as a duplicate of Accessing variables defined in enclosing scope.
Why is it possible to use a nonlocal dict but not a scalar value within a closure in python? For example:
def something():
    SCALAR = 0
    DICT = {0:0}
    def _inner():
        SCALAR += 1 # no
        DICT[0] += 1 # yes
