[Python-ideas] Marking keyword arguments (was: f-string, for dictionaries)

Paul Moore p.f.moore at gmail.com
Fri Oct 28 17:41:21 EDT 2016


On 28 October 2016 at 22:25, Sven R. Kunze <srkunze at mail.de> wrote:
> So, instead providing this kind of syntax for dicts only, why not also
> providing them for kwargs? Basically marking arguments as keyword arguments:
>
>
> my_func(:param1, :param2)
>
>
> ":param" equals "param=param" again but as already said that might just be
> placeholder syntax.
>
>
> What do you think?

-1. I don't like the use of the colon here. I don't think there's any
need to avoid the repetition in arg_name=arg_name, it's a common
convention, easy to read and understand, and even to write with a bit
of editor support. Explicit is better than implicit implies here, IMO.

Paul


More information about the Python-ideas mailing list