Let's extend your example:
>>> a = 1
>>> def foo():
print a
>>> foo()
1
So Python does take from the outer scope? >>> a = 1
>>> def foo():
a = 2
print a
>>> foo()
2
Or not? >>> a = 1
>>> def foo():
print a
a = 2
>>> foo()
UnboundLocalError: local variable 'a' referenced before assignment
Or it just doesn't work at all?Next time, pick a better example. The answer to "What does Python do with a variable from outside a function's scope?" is "It depends."
At least CoffeeScript is consistent.