[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0ddae67f4df by Vinay Sajip in branch 'default': Closes #16613: Added optional mapping argument to ChainMap.new_child. http://hg.python.org/cpython/rev/c0ddae67f4df -- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Also, please change the variable name from *amap* to either *m* or *mapping*. -- ___ Python tracker ___ _

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Put a *versionchanged* tag in the doc entry and this is ready to apply. -- ___ Python tracker ___ ___

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: > Can you write-up a patch with tests and a doc change? Done. -- stage: needs patch -> patch review ___ Python tracker ___ ___

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Vinay Sajip
Changes by Vinay Sajip : -- keywords: +patch Added file: http://bugs.python.org/file28694/951243de359a.diff ___ Python tracker ___ ___

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Vinay Sajip
Changes by Vinay Sajip : -- hgrepos: +171 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can you write-up a patch with tests and a doc change? -- stage: -> needs patch ___ Python tracker ___ __

[issue16613] ChainMap.new_child could use improvement

2013-01-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue16613] ChainMap.new_child could use improvement

2013-01-10 Thread Vinay Sajip
Vinay Sajip added the comment: > d if d is not None else {} Your intention makes sense, though I would prefer to write it as: if d is None: d = {} return self.__class__(d, *self.maps) -- ___ Python tracker

[issue16613] ChainMap.new_child could use improvement

2013-01-10 Thread Walter Dörwald
Walter Dörwald added the comment: I'd like to have this feature too. However the code should use d if d is not None else {} instead of d or {} For example I might want to use a subclass of dict (lowerdict) that converts all keys to lowercase. When I use an empty lowerdict in new_child(

[issue16613] ChainMap.new_child could use improvement

2013-01-07 Thread R. David Murray
R. David Murray added the comment: I agree that this would be useful. -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-

[issue16613] ChainMap.new_child could use improvement

2012-12-05 Thread Vinay Sajip
New submission from Vinay Sajip: 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