Here's an example that demonstrates that a non list/dict variable is available in a subroutine, and the problem is, as everyone says, the act of rebinding in your original code sample:
x = 1
def test():
y = x + 1
print y
test()
You'll see this prints out 2, despite x not being declared global.