[Python-Dev] PySequence_Concat for dicts (original) (raw)
Raymond Hettinger python at rcn.com
Sat Jan 12 01:45:20 CET 2008
- Previous message: [Python-Dev] Coverity Scan, Python upgraded to rung 2
- Next message: [Python-Dev] PySequence_Concat for dicts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Jared]
I think it would be convenient and pythonic if dict objects implemented the PySequenceConcat method.
IMO, the chainmap() recipe on ASPN is a much better solution since it doesn't create a third dictionary with the all the attendant allocation and copying effort. It isn't a common use case to need to sum two dictionaries while keeping both of the inputs unaltered.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305268.
Raymond
- Previous message: [Python-Dev] Coverity Scan, Python upgraded to rung 2
- Next message: [Python-Dev] PySequence_Concat for dicts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]