comparison Python/Python-ast.c @ 36737:fa92fe15251a legacy-trunk

Updates to the with-statement: - New semantics for __exit__() -- it must re-raise the exception if type is not None; the with-statement itself doesn't do this. (See the updated PEP for motivation.) - Added context managers to: - file - thread.LockType - threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore} - decimal.Context - Added contextlib.py, which defines @contextmanager, nested(), closing(). - Unit tests all around; bot no docs yet.
author Guido van Rossum <guido@python.org>
date Tue, 28 Feb 2006 21:57:43 +0000
parents bbf16fd024df
children dbf9cc6c36eb
comparison
equal deleted inserted replaced
36736:bbce8ec2ff81 36737:fa92fe15251a