[Python-Dev] What's the status of PEP 505: None-aware operators?
Steven D'Aprano
steve at pearwood.info
Fri Dec 1 05:31:05 EST 2017
On Thu, Nov 30, 2017 at 11:54:39PM -0500, Random832 wrote:
> The OP isn't confusing anything; it's Eric who is confused. The quoted
> paragraph of the PEP clearly and unambiguously claims that the sequence
> is "arguments -> function -> call", meaning that something happens after
> the "function" stage [i.e. a None check] cannot short-circuit the
> "arguments" stage. But in fact the sequence is "function -> arguments ->
> call".
I'm more confused than ever. You seem to be arguing that Python
functions CAN short-circuit their arguments and avoid evaluating them.
Is that the case?
If not, then I fail to see the difference between
"arguments -> function -> call"
"function -> arguments -> call"
In *both cases* the arguments are fully evaluated before the function is
called, and so there is nothing the function can do to delay evaluating
its arguments.
If this is merely about when the name "function" is looked up, then I
don't see why that's relevant to the PEP.
What am I missing?
--
Steve
More information about the Python-Dev
mailing list