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/

Reply via email to