[Python-ideas] Re: Void type

2022-07-26 Thread Mathew Elman
I believe this is a rebirth of a request that has come up many times before, which is to have something like javascript's `undefined` where it means "use the default value" if passed to a function that has a default value or "value not provided" (slightly different to "None"). >> def foo(x, y=1

[Python-ideas] Re: Void type

2022-07-26 Thread Chris Angelico
On Tue, 26 Jul 2022 at 19:37, Mathew Elman wrote: > > I believe this is a rebirth of a request that has come up many times before, > which is to have something like javascript's `undefined` where it means "use > the default value" if passed to a function that has a default value or "value > not

[Python-ideas] Re: Void type

2022-07-26 Thread Stephen J. Turnbull
Mathew Elman writes: > I believe this is a rebirth of a request that has come up many > times before, which is to have something like javascript's > `undefined` where it means "use the default value" if passed to a > function that has a default value or "value not provided" (slightly > differ

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2022-07-26 Thread Stanislav Zmiev
1) If this feature existed in Python 3.11 exactly as described, would you use it? Definitely not. It significantly increases cognitive burden on the reader. If python didn't have pattern matching, walrus, ternary expressions, etc -- then maybe I would consider this as something harmless. But righ

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2022-07-26 Thread Chris Angelico
On Wed, 27 Jul 2022 at 08:39, Stanislav Zmiev wrote: > 4) If "no" to question 1, is there some other spelling or other small > change that WOULD mean you would use it? (Some examples in the PEP.) > defer keyword that Andre proposed is a better option, in my opinion. However, > I don't like the en