Closures / Blocks in Python

Klaas mike.klaas at
Wed Jul 25 19:48:52 CEST 2007

On Jul 24, 7:58 am, treble54 <trebl... at> wrote:
> Does anyone know a way to use closures or blocks in python like those
> used in Ruby? Particularly those used in the { } braces.

Inner functions allow you to define closures and (named) blocks
anywhere).  Anonymous blocks must consist of a single expression.


More information about the Python-list mailing list