[Python-Dev] What's the status of PEP 505: None-aware operators?
Random832
random832 at fastmail.com
Thu Nov 30 11:31:56 EST 2017
On Thu, Nov 30, 2017, at 11:08, Eric Fahlgren wrote:
> On Thu, Nov 30, 2017 at 2:48 AM, Andrea Griffini <agriff at tin.it> wrote:
>
> > Not really related but the PEP says that arguments in Python are evaluated
> > before the function (as a reason to reject the idea of None-aware function
> > call) but this is not the case:
> >
>
> I think you're missing something here, since it seems clear to me that
> indeed the arguments are evaluated prior to the function call. Maybe
> unrolling it would help? This is equivalent to the body of your lambda,
> and you can see that the argument is evaluated prior to the call which
> receives it.
Of course they're evaluated prior to the function *call*, but the pep
says they're evaluated prior to the function *itself* [i.e. arg = g();
func = f(); func(arg)].
More information about the Python-Dev
mailing list