Message122387
Both arguments are true and definitive. Last possibility would be to introduce a factory function for defaultdicts that would only accept concrete values:
from collections import fallbackdict
Then this factory could produce defaultdict instances like this:
fallbackdict(0, some_key=1) --> defaultdict(lambda: 0, some_key=1)
That would be safe for future type changes as well.
If this version does not sound appealing, I can't see any other way of reliably introducing this shortcut. |
|
Date |
User |
Action |
Args |
2010-11-25 17:36:52 | lukasz.langa | set | recipients:
+ lukasz.langa, holdenweb, eric.smith, michael.foord |
2010-11-25 17:36:52 | lukasz.langa | set | messageid: <1290706612.85.0.157018776283.issue10533@psf.upfronthosting.co.za> |
2010-11-25 17:36:50 | lukasz.langa | link | issue10533 messages |
2010-11-25 17:36:50 | lukasz.langa | create | |
|