Anonymous functions (and classes)

Aahz aahz at pythoncraft.com
Thu Apr 4 16:31:55 EST 2002


In article <mailman.1017937990.14515.python-list at python.org>,
Hellen Claggett  <hellen at claggetts.net> wrote:
>
>Here is a relativly simple feature that I would like to use while
>programming in Python. First, I did make a (brief) effort to determine
>if this specific request had been made and found nothing obvious in the
>PEPs or in this year's python-list archives.
>
>I would like to be able to define anonymous functions and classes by
>omitting the function or class name normally found after the def or
>class keyword. 

Feel free to write a PEP so that this abomination can be rejected once
and for all.  ;-)  (I don't think there have been any large threads on
this in 2002, but there certainly were at least two or three in 2001.)

(Yes, I can be quite certain it will be rejected, given Guido's regret
over including lambda in the first place.  Python has rightly included
many useful bits from functional programming languages, but Python is
also emphatically *NOT* a functional language itself.)

If you don't want functions cluttering up a namespace, put them in
another module.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"There are times when effort is important and necessary, but this should
not be taken as any kind of moral imperative."  --jdecker



More information about the Python-list mailing list