
On Fri, Feb 25, 2011 at 12:55 PM, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
From: Nick Coghlan
It's at least a much larger set than it was back when AMK noticed the deep terminology confusion in the first version of the with statement and context management documentation (which was when Guido applied the Zen and dropped the __context__ method from the protocol).
I'm in favour of the idea, but the terminology problem still needs to be solved. I think it's important that the name of the object implementing this protocol not have the word "context" in it *anywhere*.
I like __with__ as the special method name, as it very obviously suggests a tight connection with the with-statement.
If the field returns a context manager, then the natural name to my mind would be __context_manager__. What I don't like about __with__ is that it's not a noun and doesn't tell me what value the attribute has or what I would do with it. Why do you think "it's important that the name ... not have the word "context" in it *anywhere*"? --- Bruce New Puzzazz newsletter: http://j.mp/puzzazz-news-2011-02 Make your web app more secure: http://j.mp/gruyere-security