![](https://secure.gravatar.com/avatar/3ab03c2cab54cc59d04b4b1cba58ab57.jpg?s=120&d=mm&r=g)
Aug. 7, 2011
3:02 p.m.
On Sun, Aug 7, 2011 at 10:50 AM, dag.odenhall@gmail.com <dag.odenhall@gmail.com> wrote:
How about adding the context manager protocol to collections.ChainMap, as an in-place combination of new_child() and parents()? The effect would simulate lexical scope using the with-statement.
Trivial to do customly but always nice when builtin or stdlib types support the context manager protocol. :)
I don't understand the utility of such a thing. Can you post a use case or two to make it clearer to people like me? Mike