The example given (I know it's synthetic, but still) can be written easily as a lambda:<p><pre><code>  button.onClick(lambda bar, fram: baz(foo(bar, fram)))
</code></pre>
The problem with embedding procedure definitions within parameter lists is indentation. Languages such as JavaScript or Ruby use explicit syntax for indentation, which allows a degree of flexibility in how procedure literals are defined. Python uses only whitespace, so trying to extend the grammar to support arbitrary procedure literals would be very difficult (according to Guido).