Message176974
ChainMap.new_child could IMO be improved through allowing an optional dict to be passed, which is used to create the child. The use case is that you sometimes need to temporarily push a new non-empty mapping in front of an existing chain. This could be achieved by changing new_child to the following, which is backwards-compatible:
def new_child(self, d=None):
'New ChainMap with a new dict followed by all previous maps.'
return self.__class__(d or {}, *self.maps) |
|
Date |
User |
Action |
Args |
2012-12-05 09:13:11 | vinay.sajip | set | recipients:
+ vinay.sajip, rhettinger |
2012-12-05 09:13:11 | vinay.sajip | set | messageid: <1354698791.22.0.0978748363163.issue16613@psf.upfronthosting.co.za> |
2012-12-05 09:13:10 | vinay.sajip | link | issue16613 messages |
2012-12-05 09:13:10 | vinay.sajip | create | |
|