summaryrefslogtreecommitdiffstats
path: root/Modules/_io/clinic/iobase.c.h
diff options
context:
space:
mode:
authorArturo Escaip <arturo.escaip@gmail.com>2020-05-26 14:55:21 (GMT)
committerGitHub <noreply@github.com>2020-05-26 14:55:21 (GMT)
commit8ad052464a4e0aef9a11663b80f187087b773592 (patch)
tree3d5f7ba3ac5e54bbeda3a950999b5345ed648e21 /Modules/_io/clinic/iobase.c.h
parentdb098bc1f05bd0773943e59f83489f05f28dedf8 (diff)
downloadcpython-8ad052464a4e0aef9a11663b80f187087b773592.zip
cpython-8ad052464a4e0aef9a11663b80f187087b773592.tar.gz
cpython-8ad052464a4e0aef9a11663b80f187087b773592.tar.bz2
bpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362)
The 'extra' argument is not always used by custom logger adapters. For example: ```python class IndentAdapter(logging.LoggerAdapter): def process(self, msg, kwargs): indent = kwargs.pop(indent, 1) return ' ' * indent + msg, kwargs ``` It is cleaner and friendlier to default the 'extra' argument to None instead of either forcing the subclasses of LoggerAdapter to pass a None value directly or to override the constructor. This change is backward compatible because existing calls to `LoggerAdapter.__init__` are already passing a value for the second argument. Automerge-Triggered-By: @vsajip
Diffstat (limited to 'Modules/_io/clinic/iobase.c.h')
0 files changed, 0 insertions, 0 deletions