[Python-ideas] Adding "+" and "+=" operators to dict
Ethan Furman
ethan at stoneleaf.us
Fri Feb 13 01:30:35 CET 2015
On 02/12/2015 04:26 PM, Eric Snow wrote:
> On Thu, Feb 12, 2015 at 11:21 AM, Thomas Kluyver <thomas at kluyver.me.uk> wrote:
>> Or perhaps even a classmethod:
>>
>> dict.merged(a, b, c)
>
> A dict factory classmethod like this is the best proposal I've seen
> thus far. * It would be nice if the spelling were more succinct
> (that's where syntax is helpful). Imagine:
>
> some_func(**dict.merged(a, b, c))
That looks an awful lot like
some_func(**chainmap(a, b, c))
--
~Ethan~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150212/9562ee2b/attachment.sig>
More information about the Python-ideas
mailing list