Steven D'Aprano wrote:
> Some weeks ago, you started a discussion here about "Clearer
> Communication". Here's another suggestion to help: don't expect your
> readers to either guess, or infer from the code, what your proposal
> means. As the Zen of Python says:
>
> Explicit is better than
Hi James,
Some weeks ago, you started a discussion here about "Clearer
Communication". Here's another suggestion to help: don't expect your
readers to either guess, or infer from the code, what your proposal
means. As the Zen of Python says:
Explicit is better than implicit.
Looking at your
Thank you, James, for your idea.
For the benefit of those who may not know, please explain the problem
you wish to solve. That way we could suggest, discuss and compare
other solutions.
--
Jonathan
___
Python-ideas mailing list
Python-ideas@python.org
On Mon, Mar 11, 2019 at 10:28 PM James Lu wrote:
>
> When
>
> from __future__ import runtime_default_kwargs
>
>
>
> Is run,
>
> def a(b=1, c=b+2, d=[]):
> pass
>
> behaves as (if the peephole optimizer didn’t exist)
>
> def a(b=None, c=None):
> if b is None:
> b = 1
> if c is
When
from __future__ import runtime_default_kwargs
Is run,
def a(b=1, c=b+2, d=[]):
pass
behaves as (if the peephole optimizer didn’t exist)
def a(b=None, c=None):
if b is None:
b = 1
if c is None:
c = b + 2
if d is None:
d = []
i.e. the keyword