From 838e638a9677e06d7a30e3c3bc0d153ccede31ba Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 9 Apr 2012 19:46:24 +0100 Subject: Corrected comment in cookbook example script. --- Doc/howto/logging-cookbook.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 2b5444a..7ee6412 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -1350,7 +1350,7 @@ works:: A simple handler for logging events. It runs in the listener process and dispatches events to loggers based on the name in the received record, which then get dispatched, by the logging system, to the handlers - configured for those records. + configured for those loggers. """ def handle(self, record): logger = logging.getLogger(record.name) -- cgit v0.12 From f6622c8a3e6bdf92778359417d0fa6c3e6bda909 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 9 Apr 2012 14:53:07 -0400 Subject: fix build without Py_DEBUG and DNDEBUG (closes #14509) --- Objects/bytesobject.c | 2 ++ Objects/unicodeobject.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index db93f37..a0c121e 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -896,7 +896,9 @@ bytes_hash(PyBytesObject *a) register unsigned char *p; register long x; +#ifdef Py_DEBUG assert(_Py_HashSecret_Initialized); +#endif if (a->ob_shash != -1) return a->ob_shash; len = Py_SIZE(a); diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2ec878f..341114f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -7341,7 +7341,9 @@ unicode_hash(PyUnicodeObject *self) Py_UNICODE *p; long x; +#ifdef Py_DEBUG assert(_Py_HashSecret_Initialized); +#endif if (self->hash != -1) return self->hash; len = Py_SIZE(self); -- cgit v0.12