[issue21172] Unexpected behaviour with logging.LogRecord "first arg is dict" case

Vinay Sajip report at bugs.python.org
Tue Apr 8 12:56:57 CEST 2014


Vinay Sajip added the comment:

I wouldn't say it is a bug, as it is working as documented - though you might say it is a request for enhancement. The documentation for string formatting at

https://docs.python.org/2/library/stdtypes.html#string-formatting-operations

says that the argument should be a "single mapping object", and, further down the same page at

https://docs.python.org/2/library/stdtypes.html#mapping-types-dict

it's clear that the mapping protocol is more than just __getitem__. Although perhaps currently only __getitem__ is used, who's to say that such will always remain the case?

Removing Python versions 3.2, 3.3 (security fixes only).

----------
versions:  -Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21172>
_______________________________________


More information about the Python-bugs-list mailing list