[Python-Dev] conditional expressions?

Daniel Mahler mahler@cyc.com
Tue, 16 Oct 2001 12:02:00 -0500


Guido van Rossum writes:
 > >  > (1) In order to do short-circuiting evaluation, the name would have to
 > >  >     be recognized by the parser, which means it would have to be a new
 > >  >     keyword. 
 > > 
 > > That surprises me.
 > > In a conventional compiler architecture,
 > > I would expect this to be a static analysis and code generation issue.
 > > In languages that have multiple parameter passing disciplines
 > > (eg Pascal, Simula), 
 > > the parser does not track how any given argument is being passed.
 > 
 > This just shows how little you know about how Python is implemented. ;-(

True, but I am learning.

 > 
 > >  > (2) It looks too much like a function call for my comfort.
 > > 
 > > I am trying to make the case that it *is* a function call,
 > > with args 2 & 3 being passed by-name.
 > > Or at least it can very sensibly be viewed and implemented that way.
 > 
 > Python has no by-name argument passing mechanisms, and adding one just
 > for this purpose strikes me as the tail wagging the dog.

But it need not be the only one ;)

 > --Guido van Rossum (home page: http://www.python.org/~guido/)

regards
Daniel