On Tue, Oct 26, 2021 at 4:46 PM Rob Cliffe via Python-ideas <
[email protected]> wrote:

> There has been support for evaluating all early-bound defaults before
> all late-bound defaults.  I have been persuaded that this is a
> reasonable option.


How could that be avoided? by definition, early bound is evaluated
"earlier" than  late-bound :-)

early-bound (i.e. regular) parameters are evaluated at function definition
time. But the time we get to the late-bound ones, those are actual values,
not expressions.

The interpreter could notice that early bound names are used in late-bound
expressions and raise an error, but if not, there'd be no issue with when
they were evaluated.

This could cause a bit of confusion with "getting" that it's not a simple
left-to-right rule, but that's the same potential confusion with early vs
late bound parameters anyway.

-CHB

-- 
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/5757MQ33UV2NZDFGVS4P2N2WI6TGHZYC/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to