diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-11 07:43:25 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-11 07:43:25 (GMT) |
commit | a41fb4be5bd6ecb931f53c86f255e7e9d185bbcb (patch) | |
tree | 560fe3d427882d25669b8c8b548cedafaf514fb6 /Doc/howto/logging-cookbook.rst | |
parent | 05cd03aa0dd53bdee72ff3a996873341d0e6ba19 (diff) | |
parent | c9cfcf1e6cd946492be949533de906785d690069 (diff) | |
download | cpython-a41fb4be5bd6ecb931f53c86f255e7e9d185bbcb.zip cpython-a41fb4be5bd6ecb931f53c86f255e7e9d185bbcb.tar.gz cpython-a41fb4be5bd6ecb931f53c86f255e7e9d185bbcb.tar.bz2 |
#17351: merge with 3.3.
Diffstat (limited to 'Doc/howto/logging-cookbook.rst')
-rw-r--r-- | Doc/howto/logging-cookbook.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index e9e56d6..e8d2cdf 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -1034,7 +1034,7 @@ arbitrary object as a message format string, and that the logging package will call ``str()`` on that object to get the actual format string. Consider the following two classes:: - class BraceMessage(object): + class BraceMessage: def __init__(self, fmt, *args, **kwargs): self.fmt = fmt self.args = args @@ -1043,7 +1043,7 @@ following two classes:: def __str__(self): return self.fmt.format(*self.args, **self.kwargs) - class DollarMessage(object): + class DollarMessage: def __init__(self, fmt, **kwargs): self.fmt = fmt self.kwargs = kwargs @@ -1370,7 +1370,7 @@ works:: import random import time - class MyHandler(object): + class MyHandler: """ 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, |