[Python-Dev] -Dwarn, long->double overflow (was RE: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.219,1.220)
Guido van Rossum
guido@python.org
Sun, 02 Sep 2001 21:52:42 -0400
> > I think I'll go for something stupid and simple now, like just using
> > -q to turn on division warnings, and nothing else (the -Dnew option is
> > not very useful I think).
>
> I'm fine with a single option, but I'd like to note two things: we already
> have a command line option to turn on specific warnings, do we really need
> another ?
Yes, for efficiency reasons. A call to PyErr_Warn(), even if it
doesn't print anything, is very expensive (compared to a division): it
calls out to the warnings.py module which goes through a list of
filters etc., etc.
> And -q, to me, *screams* 'quiet', exactly the wrong thing... How
> about -Q instead, if we really need a separate option for it ?
OK.
--Guido van Rossum (home page: http://www.python.org/~guido/)