[Python-ideas] Anonymous blocks (again):

Juancarlo Añez apalala at gmail.com
Mon May 13 05:58:35 CEST 2013


On Sun, May 12, 2013 at 10:23 PM, Stephen J. Turnbull <stephen at xemacs.org>wrote:

> Python doesn't use redundant keywords for a single construct.
> "let" is redundant with the following "def"s.  On top of that, "let"
> being a new keyword will kill this syntax, I think.
>

I don't want new syntax (I think I don't).

What I want is to be able to invoke a block of code repeatedly, within a
context, and in a pythonic way.

within closure():

do_this()
and_do_that()


If it can't be pythonic (clear to the reader), I'm not interested. It's
good enough as it is:

def block():

do_this()

do_that()

closure(block)

Cheers,

-- 
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130512/2dceb9c2/attachment.html>


More information about the Python-ideas mailing list