It's unclear to me what `Void` is meant to provide in your example. Is your hope for a `Void` value to not be passed as a parameter to the wrapped function?
On Sun, 2022-07-24 at 17:55 +0000, Крупенков Михаил wrote: > Hello, I'll give an example: > > def func(param="default"): > ... > > def func_wrapper(..., param="default"): > ... > func(param) > > We have to duplicate value of parameter "default" if we want to use > this as the default. Or we can do that: > > def func(param="default"): > ... > > def func_wrapper(..., *args): > ... > func(*args) > > But it won't always be possible. In addition, auto-completion in IDEs > won't work. > It would be cool to have an empty type like Void (not None) for > explicit full control: > > def func(param="default"): > ... > > def func_wrapper(..., param=Void): > ... > func(param) > _______________________________________________ > 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/R464MUFZ4T2PRT4EPOIPKSHGDXSOB25E/ > Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ 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/F5N3V6FS6LNDCKVZ3OQE7ZUJM3DMROOB/ Code of Conduct: http://python.org/psf/codeofconduct/