PEP-308 a "simplicity-first" alternative

Erik Max Francis max at alcyone.com
Wed Feb 12 18:42:35 EST 2003


Bengt Richter wrote:

> My latest-ang-greatest is just to use the old expression with a
> minimal markup:
> 
>     x and {y} or z
> 
> where {y} means treat y as True in logical expression context, but
> don't change
> the value. Stylistically,
> 
>     x and {y} or {z}
> 
> is optional.

Curly braces means dictionaries.  In my opinion, this is a really bad
choice of notation; it does not suggest lazy evaluation at all.  And for 

For the record, I'm not against some generalized form of lazy
evaluation, but hopefully it would be something not too intrusive, and
also not too interfering (the idea, suggested a while back, of having a
syntax for specifying lazily-evaluated arguments to functions throws a
sabot into the machinery; now when you look at what looks to be a
function call, you have no idea whether the arguments will be evaluated
first or not.  (I suppose the same objection goes for macros.)

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ You cannot step into the same river once.
\__/ Cratylus
    Python chess module / http://www.alcyone.com/pyos/chess/
 A chess game adjudicator in Python.




More information about the Python-list mailing list