map/filter/reduce/lambda opinions and background unscientificmini-survey

George Sakkis gsakkis at rutgers.edu
Wed Jul 6 09:21:45 EDT 2005


"Terry Reedy" <tjreedy at udel.edu> wrote:

> "George Sakkis" <gsakkis at rutgers.edu> wrote in message
> news:1120610787.940292.15210 at g43g2000cwa.googlegroups.com...
> > Still it's hard to explain why four specific python keywords - def,
> > del, exec and elif - were chosen to be abbreviated,
>
> Precedence in other languages and CS usage?

What precedence ? I don't know of another language that uses def or del
at least; even C++ which compared to python is much more terse uses
"delete" instead of del. And in any case, curly braces for grouping
statements is much more prevalent in other languages and CS usage but
(fortunately) python chose indentation.

> > So, who would object the full-word versions for python 3K ?
> > def -> define
> > del -> delete
> > exec -> execute
>
> These three I might prefer to keep.
>
> > elif -> else if
>
> This one I dislike and would prefer to write out.  I never liked it in
> whatever else language I first encountered it and still don't.

In contrast to the first three changes which would be straightforward,
changing "elif" to "else if" would add (a little?) complexity to the
parser by allowing "else" to be followed either by a colon (the only
choice now) or "if", though I don't think this would be a decisive
factor. 

George




More information about the Python-list mailing list