commit | 1a5e21e0334a6d4e1c756575023c7157fc9ee306 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Feb 28 21:57:43 2006 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Feb 28 21:57:43 2006 +0000 |
tree | d2c1c9383b3c6d8194449ae756e663b0b0ac9e4e | |
parent | 87a8b4fee56b8204ee9f7b0ce2e5db0564e8f86e [diff] |
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.