[Python-ideas] Short form for keyword arguments and dicts
Ryan Hiebert
ryan at ryanhiebert.com
Tue Jun 25 05:07:56 CEST 2013
On Jun 24, 2013, at 7:51 PM, Andrew Barnert <abarnert at yahoo.com> wrote:
>
> I suppose if someone later reorders the parameters of get_special_url without making any other change to the API, my code will still work. But how often does that happen? And I'm not sure a language change that encourages such API changes is a good thing.
An library implementor can already write code that allows him to have keyword-only arguments, so he can avoid polluting the compatibility he must maintain in his positional arguments. It's less about allowing him to reorder them, and more about separating the positional and keyword arguments.
I've not seen a solution I'm totally sold on yet, but supporting keyword argument shorthand seems like a good idea to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4142 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130624/5b2ae55b/attachment.bin>
More information about the Python-ideas
mailing list