[issue6410] Dictionaries should support __add__
Raymond Hettinger
report at bugs.python.org
Mon Jul 6 23:23:54 CEST 2009
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
FWIW, I'm -1 on the proposal because it partially overlaps the existing
capability of dict.update(). To the extent it doesn't overlap, it is
use case challenged (typically, it doesn't make sense to build a
brand-new dictionary from two independent dictionaries and the atypical
case easily fulfilled by a couple of updates on an empty dict).
Also, the notation itself is at odds with the existing pipe-operator
used by sets and by dict views.
FWIW, there are other alternatives to directly combining dictionaries.
See http://code.activestate.com/recipes/305268/ for one example.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6410>
_______________________________________
More information about the Python-bugs-list
mailing list