PEP 736: Keyword Argument Shorthand: Final Draft

This is an interesting variation, but the dot is still pretty easy to miss. However, using @ could work:

my_function(
    my_first_variable=@,
    my_second_variable=@,
    my_third_variable=@
)

It’s using it as a mnemonic for “the value stored AT the local variable with the same name as the parameter”, rather than indicating any relationship with function decorators or matrix multiplication.

Tangent: if @ was adopted for this use case, then we could potentially also introduce @"" as a way to refer to the string form of assignment target names (as in MyTuple = namedtuple(@"", "a b c"))

6 Likes