[issue9705] limit dict.update() to a given list of keys
Raymond Hettinger
report at bugs.python.org
Sat Aug 28 22:02:51 CEST 2010
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
FWIW, the usual way to spell this in Python is:
my_dict_1.update((k, my_dict_2[k]) for k in ['a', 'c'])
We try to keep filtering operations separate from map/fold operations for orthognality.
----------
nosy: +rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9705>
_______________________________________
More information about the Python-bugs-list
mailing list