PEP 736 – Shorthand syntax for keyword arguments at invocation
peps.python.org
peps.python.org
Haha! :D nice one!
Personally I would prefer if they chose the `f(:x)` syntax, because it reminds me of how Ruby uses symbols to represent instance variables.
And it just makes sense to do it this way as
a) it is basically the same as in ruby, except that the long form in ruby uses a colon and python uses an equals sign
b) this syntax already exists in python for f-strings
But I agree x= looks a bit "unfinished" and erroneous while :x does not IMO, though I'm looking forward to do fewer keypresses if this gets released.
This would make the proposal's first example read:
my_function(**, my_first_variable, my_second_variable, my_third_variable)
More readable IMHO. They do mention f(a, b, *, x) in the proposal and present some objections, but arguably ** makes it easy to understand that these are keyword arguments.The coder's laziness have gone too far. That's ridiculous.
Just checked, the author is a Google folk, that says a lot.