Let's take a trivial example that would work in JavaScript or Scheme. Often, I want to keep track of how many times a particular function gets called (usually for debugging). I would expect to be able to do something like this:
counter = 0
def foo(bar, baz):
counter += 1
...
This does not work in Python. You could use the global keyword to work around this: counter = 0
def foo(bar, baz):
global counter
counter += 1
...
This is something of an ugly hack in the language design. Moreover, this falls apart if counter is not in the global scope itself--for example, if foo is defined inside another function. Python 3 introduces the nonlocal keyword to deal with this.Fundamentally, this problem stems from the fact that Python conflates two fundamentally different operations: defining a variable and mutating it. I personally really like how Scheme handles this: defining and setting are two different actions, and trying to set a variable that has not been defined is an error. This makes the intentions of the programmer much clearer.
A very common pattern in Scheme and JavaScript (as well as other languages I don't use, no doubt) is to use closures to encapsulate state. Thanks to Python's scoping model, this is at best a pain and certainly unnatural.
There are also some minor annoyances. One that gave me problems recently (although it has been fixed in Python 3, I believe), was with list comprehensions:
[i * i for i in range(1, 10)]
print i # gives you 9!