implement util.defaultdict() + general usage
Issue #582
resolved
py2.5 has collections.defaultdict()
which uses a callable to set a missing value. its natively implemented so should be far faster than in-python methods of doing the same thing.
implement util.defaultdict() which will try to call 2.5's version of it, then fall back to a regular dict with a "if key not in self: create" type of paradigm, then implement wherever the usual pattern is used. key place: base.py/ResultProxy._convert_key, in fact remove the _convert_key call altogether and place its "create value" code within the defaultdict.
Comments (3)
-
-
reporter - changed status to resolved
implemented what i was looking for re:resultproxy in changeset:2682
-
reporter - removed milestone
Removing milestone: 0.4.0 (automated comment)
- Log in to comment
Added defaultdict to util in 2679, go nutty.