map/filter/reduce/lambda opinions and background unscientific mini-survey

George Sakkis gsakkis at rutgers.edu
Tue Jul 5 20:46:27 EDT 2005


"Steven D'Aprano" <steve at REMOVETHIScyber.com.au> wrote:

> On Tue, 05 Jul 2005 09:46:41 -0500, Terry Hancock wrote:
[snip]

> > Having said that, I too will miss the *concept* of an anonymous
> > function, although I wouldn't mind at all if its name changed, or if it
> > were somehow integrated into the "def" keyword's usage.
>
> Def would be short for ... defend? defile? defer? defame? default? deflect?
>
> There's always *something* to learn. Why def instead of define? Because
> "easy to write" beats "instantly obvious to a beginner", if the word is
> used all the time and is easy to memorize.

Still it's hard to explain why four specific python keywords - def,
del, exec and elif - were chosen to be abbreviated, while all the rest
are full words (http://docs.python.org/ref/keywords.html). "Ease of
typing" is a joke for an excuse; "finally" is longer than
"define","delete" and equally long to "execute" and "else if" (the
latter has the even more serious flaw of going against TOOWTDI and in
this case practicallity hardly beats purity IMO). In any case, python
was never about minimizing keystrokes; theres another language that
strives for this <wink>.

So, who would object the full-word versions for python 3K ?
def -> define
del -> delete
exec -> execute
elif -> else if

George




More information about the Python-list mailing list