[Python-ideas] Short form for keyword arguments and dicts

Joshua Landau joshua.landau.ws at gmail.com
Sat Jun 22 21:33:23 CEST 2013


On 22 June 2013 20:23, Anders Hovmöller <boxed at killingar.net> wrote:
> Well no, because:
>
> foo(**dict(a=a, b=b, c=c))
> foo(**{'a':a, 'b':b, 'c':c})
> foo(a=a, b=b, c=c)
>
> are all the same thing. So the short forms should match in the same way:
>
> foo(**dict(=a, =b, =c))
> foo(**{:a, :b, :c})
> foo(=a, =b, =c)

What about:

class Foo:
    bar = bar

to

class Foo:
    = bar

?

I'm not convinced either.
I like the idea, but it's not that big a deal and I don't like your
proposed implementation.
There are so many more cases to cover and this doesn't fill them, nor
it's original one nicely.


More information about the Python-ideas mailing list