Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
___
Raymond Hettinger added the comment:
Can you write-up a patch with tests and a doc change?
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
hgrepos: +171
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
___
Python-bugs-list
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
keywords: +patch
Added file: http://bugs.python.org/file28694/951243de359a.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
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 rep...@bugs.python.org
http://bugs.python.org/issue16613
___
Raymond Hettinger added the comment:
Put a *versionchanged* tag in the doc entry and this is ready to apply.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: rhettinger - vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
Raymond Hettinger added the comment:
Also, please change the variable name from *amap* to either *m* or *mapping*.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
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 -
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
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 rep...@bugs.python.org
R. David Murray added the comment:
I agree that this would be useful.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16613
___
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
13 matches
Mail list logo