Closures / Blocks in Python

Klaas mike.klaas at gmail.com
Wed Jul 25 13:48:52 EDT 2007


On Jul 24, 7:58 am, treble54 <trebl... at gmail.com> 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.

-Mike




More information about the Python-list mailing list