Named code blockes
Alex Martelli
aleaxit at yahoo.com
Fri Apr 13 09:17:26 EDT 2001
"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:FVnB6.6958$4N4.1514190 at newsc.telia.net...
> Aahz Maruch wrote:
> > >Is there a discussion/sugesstion about enabling named code blockes
(like
> > >lisp, perl ...) in Python?
> >
> > What's a named code block?
>
> anonymous statement suites, not just anonymous expressions
> like today's lambdas.
Ah, UN-named code blocks, then, right?
Is it so 'costly' to give these statement suites a name? I
generally find that turning a lambda into a (named) local
function makes my code clearer in all but the most trivial
cases -- if that applies to expressions, it should a fortiori
apply to suites.
> (imo, nested scopes are pretty useless without real blocks)
I'm not so hot about nested scopes, but, anyway, we DO have
'real' blocks -- surely, giving them a name doesn't take
their reality away, does it?-)
Alex
More information about the Python-list
mailing list