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

Anders Hovmöller boxed at killingar.net
Sun Jun 23 10:22:26 CEST 2013


> You initially said that ObjC deals with this problem better than Python,
> and now you say that it's better because it forces you to use the keyword
> names (actually they're part of the method name, but let's ignore that)
> _always_, which Python only forces you to do it when not using them
> positionally.
>
> I don't understand why you're making this argument in support of a
> proposal that would make Python even less explicit about keyword names,
> less like ObjC, and, by your analysis, harder to maintain and therefore
> worse.
>

I think you and I are talking about different things when talking about
"this problem". For me the problem is to avoid stuff like "foo(1, 'foo',
None, 9, 'baz')", not avoid repeating names. I just believe that python has
syntax that promotes positional arguments even when it makes the code
worse. My suggestion might on the surface look like just a way to type
less, but that misses the point. It's about shifting the balance towards
keyword arguments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130623/4d43bcdb/attachment-0001.html>


More information about the Python-ideas mailing list