Mercurial > cpython-lru_cache-weakref
diff Python/future.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 | cea54c9d921d 49c6eb688906 |
