A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-October/017975.html below:

[Python-Dev] conditional expressions?

[Python-Dev] conditional expressions? [Python-Dev] conditional expressions?Daniel Mahler mahler@cyc.com
Tue, 16 Oct 2001 11:11:06 -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.

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

 > 
 > I still like
 > 
 >     (if cond then expr else expr)
 > 
 > better than any of these.

:(

 > --Guido van Rossum (home page: http://www.python.org/~guido/)
 > 
 > _______________________________________________
 > Python-Dev mailing list
 > Python-Dev@python.org
 > http://mail.python.org/mailman/listinfo/python-dev

Daniel




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4