[Python-Dev] conditional expressions? (original) (raw)
Guido van Rossum guido@python.org
Tue, 16 Oct 2001 12:24:43 -0400
- Previous message: [Python-Dev] conditional expressions?
- Next message: [Python-Dev] conditional expressions?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> (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. ;-(
> (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.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] conditional expressions?
- Next message: [Python-Dev] conditional expressions?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]