[Python-Dev] Warning Framework (PEP 230)

Greg Stein gstein@lyra.org
Mon, 11 Dec 2000 16:15:50 -0800


On Mon, Dec 11, 2000 at 11:53:37AM -0500, Guido van Rossum wrote:
>...
> > - The second argument to sys.warn() or PyErr_Warn() can be any class,
> >   right?
> 
> Almost.  It must be derived from __builtin__.Warning.

Since you must do "from warnings import warn" before using the warnings,
then I think it makes sense to put the Warning classes into the warnings
module. (e.g. why increase the size of the builtins?)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/