[Python-Dev] dict.merge()? (original) (raw)
Jewett, Jim J jim.jewett at eds.com
Fri Apr 30 12:26:13 EDT 2004
- Previous message: [Python-Dev] Small additions to optparser
- Next message: [Python-Dev] dict.merge()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At the C level,
PyDict_Update(old, new)
is just a shortcut for
override=1
PyDict_Merge(old, new, override)
C extensions can use PyDict_Merge directly with override=0, which keeps the current value in case of duplicate keys.
Python code can only use update, which means that override is always true. Is there a good reason this?
-jJ
- Previous message: [Python-Dev] Small additions to optparser
- Next message: [Python-Dev] dict.merge()?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]