Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures.
Some limitations are mentioned in the Closures in Python (compared to Ruby’s closures), but the article is old and many limitations do not exist in modern Python any more.
Seeing a code example for a concrete limitation would be great.
Related questions:
The most important limitation, currently, is that you cannot assign to an outer-scope variable. In other words, closures are read-only:
A name that gets assigned to in a local scope (a function) is always local, unless declared otherwise. While there is the ‘global’ declaration to declare a variable global even when it is assigned to, there is no such declaration for enclosed variables — yet. In Python 3.0, there is (will be) the ‘nonlocal’ declaration that does just that.
You can work around this limitation in the mean time by using a mutable container type: