[Python-ideas] Re: Void type

2022-07-25 Thread Михаил Крупенков
Yes, I want that when Void is received in a function parameter it is not processed: func(Void) == func() == "default" ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.pyth

[Python-ideas] Re: Void type

2022-07-25 Thread Chris Angelico
On Mon, 25 Jul 2022 at 19:41, Михаил Крупенков wrote: > > Yes, I want that when Void is received in a function parameter it is not > processed: > > func(Void) == func() == "default" It's very difficult to follow this topic because each of your posts begins a completely new thead, with no referen

[Python-ideas] Re: Void type

2022-07-25 Thread João Santos
You can easily achieve this with something like Void = object() def func(param=Void):   if param is Void:     param = "default" or in the wrapper: Void = object() def wrapper(param=Void, **kwargs):   if param is not Void:     kwargs["param"] = param   return func(**kwargs) With some ex

[Python-ideas] Re: Void type

2022-07-25 Thread Anthony Flury via Python-ideas
use None - that is effectively what you need. unless of course None is valid in your data set. -- Anthony Flury email : [email protected] Twitter : @TonyFlury > On Jul 25, 2022, at 10:43 AM, Михаил Крупенков wrote: > >  > Yes, I want that when Void is received in a function par