For review: PEP 308 - If-then-else expression

Erik Max Francis max at alcyone.com
Wed Feb 12 18:55:03 EST 2003


David Eppstein wrote:

> In article <mailman.1045024432.16082.python-list at python.org>,
>  Andrew McNamara <andrewm at object-craft.com.au> wrote:
	...
> >         c -> { 0: x, 1: y, 2: z }
> 
> Interesting syntax.  My biggest concern with it is that the right hand
> side looks just like a normal dictionary -- to do ternary operators
> correctly you'd want some kind of lazy evaluation there, but the
> laziness isn't apparent from the syntax.

I agree.  If you're really going to shoot for _some_ kind of lazy
evaluation syntax, I think something that does not look like anything
we've seen would be better.  I'd much prefer something like <>
delimiters, although I have no idea if that would cause grammar
problems.  i.e., if you're really going to implement lazy evaluation, it
should look like nothing you've seen before, so there's no question This
Is Something New.

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