A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-March/098235.html below:

[Python-Dev] Silencing DeprecationWarning by default in Python 2.7 is silencing division warnings

[Python-Dev] Silencing DeprecationWarning by default in Python 2.7 is silencing division warnings [Python-Dev] Silencing DeprecationWarning by default in Python 2.7 is silencing division warningsBrett Cannon brett at python.org
Sat Mar 6 20:43:20 CET 2010
I see two possible fixes for this. One is to not silence DeprecationWarning
if Py_DivisionWarningFlag is set to >= 1. The other is to introduce a new
subclass of DeprecationWarning called IntegerDivisionWarning and have that
added to the warnings filter so that if it is triggered it is handled
separately from what DeprecationWarning triggers.

The former means that you might get more than you bargained for in terms of
warnings as you are suddenly switching on all DeprecationWarnings on top of
division warnings. The latter means that you now have to explicit care about
IntegerDivisionWarning on top of DeprecationWarning (to minimize this I
could have IntegerDivisionWarning added to the warnings filter only in the
case of when Py_DivisionWarningFlag is set instead of blindly adding it).

Thoughts?

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100306/359432b1/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4