On 10/23/21 9:07 AM, Chris Angelico wrote:

> Proposal: Proper syntax and support for late-bound argument defaults.

I like the proposal.

> def spaminate(thing, count=:thing.getdefault()):
>      ...
>
> def bisect(a, x, lo=0, hi=:len(a)):
>      if lo < 0:
>          raise ValueError('lo must be non-negative')

But not the color -- I see "=:" too easily confused with ":=".  However, I do 
like:

--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ZEN4ZGBSMDCUW5JT5LLD45NKQIQDC5UT/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to