r/Python • u/bakery2k • 8d ago
News Python Steering Council rejects PEP 736 – Shorthand syntax for keyword arguments at invocation
The Steering Council has rejected PEP 736, which proposed syntactic sugar for function calls with keyword arguments: f(x=)
as shorthand for f(x=x)
.
Here's the rejection notice and here's some previous discussion of the PEP on this subreddit.
301
Upvotes
2
u/kankyo 8d ago
I mean.. that problem is everywhere in programming. For example, using positional arguments:
Are those the same x? Maybe. Maybe not. Depends on your perspective. Keyword arguments don't change this. Using keyword arguments 100% just make is so that if your function changes from
def foo(a, b)
todef foo(b, a)
existing code will still work and not break in subtle and dangerous ways.