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/2008-January/076115.html below:

[Python-Dev] PySequence_Concat for dicts

[Python-Dev] PySequence_Concat for dicts [Python-Dev] PySequence_Concat for dictsRaymond Hettinger python at rcn.com
Sat Jan 12 02:21:16 CET 2008
> I wasn't suggesting that the result of concatenation would 
> be a  chained table, rather that it would perform the 
> equivalent of an  update and return the new dict 
>(the same way extend works for lists)

When does it come-up that you want a third summed dict 
while keeping the two originals around unchanged?  Does
it matter that the addition is non-commutative?  Would
a + b + c produce an intermediate a/b combo and then
another new object for a/b/c so that the entries in
a get copied twice and memory usage has to hold a, b,
a/b, c, and a/b/c in memory all at the same time?  
What are the use cases?

FWIW, the Py3.0 API for dicts will support some set-like
operations.  Perhaps, that fits the bill.


Raymond
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