This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author glyph
Recipients benjamin.peterson, brett.cannon, exarkun, glyph
Date 2008-09-04.23:17:59
SpamBayes Score 3.7552716e-09
Marked as misclassified No
Message-id <1220570280.68.0.537640694484.issue3780@psf.upfronthosting.co.za>
In-reply-to
Content
The use of the term "filter" is pretty confusing.  I would normally say
it was just me, but a bunch of other Twisted hackers seemed to interpret
it the same way: a "filter" is something that has an opportunity to
remove something else.  For example, the python builtin function
"filter".  Experimentation with the filters list seems to confirm this
impression, since later filters do not have an opportunity to access the
warnings that earlier filters have removed.  The intuitive leap there is
to assume that inserting a filter at the head of the list won't do
anything different than inserting it at the tail, since a later filter
will remove it.

I can't think of an obvious recommendation to improve the text for the
filter system itself, because upon reading it in more depth, it's fairly
clear.  Maybe the heading could be changed to something more like
"intercepting warnings" or "controlling the way that warnings are
emitted"?  Something attention-grabbing that describes its purpose and
doesn't use the word "filter".  Even a sub-heading which simply
described how to use 'always'   filter to cause every warning to be
emitted would be helpful.

The biggest improvement to the documentation for "catch_warnings" would
be to put it in a section of its own, "How To Test Your Code Which Uses
Warnings", not as a footnote in "Available Classes".

(Also, as a minor note to be taken at your discretion: should
catch_warnings be named PEP 8 style as a class, since it is one?  I
don't really want to open that can of worms after reading the
interminable threading.Event thread, but it seemed worth saying as long
as was talking about this...)
History
Date User Action Args
2008-09-04 23:18:00glyphsetrecipients: + glyph, brett.cannon, exarkun, benjamin.peterson
2008-09-04 23:18:00glyphsetmessageid: <1220570280.68.0.537640694484.issue3780@psf.upfronthosting.co.za>
2008-09-04 23:18:00glyphlinkissue3780 messages
2008-09-04 23:17:59glyphcreate