New submission from Antoine Pitrou:

The idiomatic way to use a LoggerAdapter is to override the process() method. 
However, the example in the cookbook (*) is some gobbledegook code overriding 
__getitem__ and __iter__ on a separate class. It's a pity that users are 
directed to use an insane and impractical idiom while the sane way is simple 
and powerful.

(*) http://docs.python.org/2/howto/logging-cookbook.html#context-info

----------
assignee: docs@python
components: Documentation
messages: 193633
nosy: docs@python, pitrou, vinay.sajip
priority: normal
severity: normal
status: open
title: LoggerAdapter example is counter-productive
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to