A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-November/122715.html below:

[Python-Dev] performance of {} versus dict()

[Python-Dev] performance of {} versus dict()Xavier Morel python-dev at masklinn.net
Wed Nov 14 23:01:32 CET 2012
On 2012-11-14, at 21:53 , Mark Adam wrote:

> On Wed, Nov 14, 2012 at 1:37 PM, Xavier Morel <catch-all at masklinn.net> wrote:
>> On 2012-11-14, at 19:54 , Mark Adam wrote:
>>> 
>>> Merging of two dicts is done with dict.update.
>> 
>> No, dict.update merges one dict (or two) into a third one.
> 
> No.  I think you need to read the docs.

I know what the docs say. dict.update requires an existing dict and (as
mutator methods usually do in Python) doesn't return anything. Thus it
merges a dict (or two) into a third one (the subject of the call).

>>> How do you do it on
>>> initialization?  This doesn't make sense.
>> 
>> dict(d1, **d2)
> 
> That's not valid syntax is it?

Of course it is, why would it not be?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4