Logging messages with dictionary args in Python 2.4b1 leads to exception
steve at holdenweb.com
Fri Oct 22 13:52:31 CEST 2004
Vinay Sajip wrote:
> Steve Holden <steve at holdenweb.com> wrote in message news:<ROXdd.8976$SW3.2862 at fed1read01>...
>>But how much simpler
>>logging.want("%(string)s and the %(number)d dwarves",
>> string="Snow White", number=7)
> logging.want? ;-)
Wishful thinking :-)
> Well, it was a trivial example. In real use cases, the dict would be a
> variable rather than a literal. The problem with using kwargs is that
> it could interfere with keyword arguments passed to the logging method
> (currently only exc_info, but there may be others in future).
Indeed, my ignorance of the current API misled me. But *otherwise* it
would have been a good idea, no?
Holden Web LLC +1 800 494 3119
More information about the Python-list