2 ms·
A great example of the Blub paradox in action ;) Actually not. There is no code you can write using closures modifying external state that cannot be trivially
by btilly 16y ago
A great example of the Blub paradox in action ;)
Actually not. There is no code you can write using closures modifying external state that cannot be trivially rewritten in Python using a one-element array in the outer scope which you modify in the inner (without assigning). Therefore Python has that feature in effect. It just doesn't have a piece of dedicated syntax for it.