From 1a5e21e0334a6d4e1c756575023c7157fc9ee306 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 28 Feb 2006 21:57:43 +0000 Subject: 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. --- Python/errors.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/errors.c') diff --git a/Python/errors.c b/Python/errors.c index cbcc6facaf..c33bd13bde 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -24,6 +24,7 @@ PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) if (traceback != NULL && !PyTraceBack_Check(traceback)) { /* XXX Should never happen -- fatal error instead? */ + /* Well, it could be None. */ Py_DECREF(traceback); traceback = NULL; } -- cgit v1.2.1