Python-list digest, Vol 1 #10324 - 13 msgs

Jonathan Claggett jonathan at claggetts.net
Fri Apr 5 08:58:15 EST 2002


On Thu, 2002-04-04 at 18:08, python-list-request at python.org digested:

> >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.)

I might create the PEP for posterity's sake. Should I dub it the
'sacrificial PEP'?

> (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.)

This is interesting news to me since I've been picking Python habits up
from the latest edition of Programming Python and which uses lambda a
fair amount. Specifically, I've been using them in my Tkinter programs
to pass extra parameters to my event handlers. Is it more proper
(Pythonic) to def the helper function first and pass the helper function
name second?

Actually, I really wasn't thinking in terms of functional programming (I
can't Lisp my way out of a paper bag :-). My immediate motive was only
skin deep in that I'd like to replace the (unique) lambda syntax in my
code with the (standard) def syntax.








More information about the Python-list mailing list