There was a long discussion about a year ago:
https://mail.python.org/archives/list/python-ideas@python.org/thread/SIMIOC7OW6QKLJOTHJJVNNBDSXDE2SGV/#N2ZY5NQ5T2OJRSUGZJOANEQOGEQIYYIK
Eric
On 3/18/2021 12:28 AM, alexei.ciob...@adelaide.edu.au wrote:
Hi all,
Not sure if this feature already exists in python or if it has been proposed
already but it would be extremely helpful for me and doesn't seem too difficult
to implement.
I often write functions with really long kwarg names that call other functions
that share a kwarg name.
What I currently have is something like (very simplified example)
def function1(x, y, some_really_long_kwarg=True, **kwargs):
other_kwarg = x>y
function2(x, y, some_really_long_kwarg=some_really_long_kwarg,
other_kwarg=other_kwarg)
return
What I would like is to be able to write something like
def function1(x, y, some_really_long_kwarg=True, **kwargs):
other_kwarg = x>y
function2(x, y, some_really_long_kwarg=, other_kwarg=)
return
where the kwarg= behaves similarly to how it does for f-strings in python3.8
when you write something like f'{other_kwarg=}'
_______________________________________________
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/AOWAHGWQQYOSPYBOUOFDIGDMAVUXSYSO/
Code of Conduct: http://python.org/psf/codeofconduct/
--
Eric V. Smith
_______________________________________________
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/GYT4GUOUBOTTMWMLP2UCA5IOXV3M3XX4/
Code of Conduct: http://python.org/psf/codeofconduct/