Get rid of __context__, per the latest changes to PEP 343 and python-dev

discussion.
There are two places of documentation that still mention __context__:
Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without
spending a whole lot of time thinking about it; and whatsnew, which Andrew
usually likes to change himself.
This commit is contained in:
Guido van Rossum 2006-05-02 19:47:52 +00:00
parent 8f6cbe1502
commit da5b701aee
15 changed files with 27 additions and 202 deletions

View file

@ -2248,7 +2248,7 @@ class Context(object):
s.append('traps=[' + ', '.join([t.__name__ for t, v in self.traps.items() if v]) + ']')
return ', '.join(s) + ')'
def __context__(self):
def context_manager(self):
return WithStatementContext(self.copy())
def clear_flags(self):