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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/AOWAHGWQQYOSPYBOUOFDIGDMAVUXSYSO/
Code of Conduct: http://python.org/psf/codeofconduct/