[Python-ideas] warnings package might provide an Option or a pre-filled OptionParser

Antoine Pitrou solipsis at pitrou.net
Fri Feb 19 22:37:25 CET 2010

Le Fri, 19 Feb 2010 22:16:18 +0100, Masklinn a écrit :
>>> While nice, this option isn't available out of the box to scripts
>>> where the interpreter is implicit (./script.py, or `script` where it's
>>> on $PATH). I believe it would be nice if `warnings` provided something
>>> one could simply drop into `optparse` to automagically get -W
>>> handling, without having to define custom option actions every time.
>> It makes sense. Can you propose a patch on the tracker?
> I can try. Should it be for Python 3 trunk?

Either 2.x trunk (the SVN trunk) or 3.x trunk (the "py3k" branch), as you 

More information about the Python-ideas mailing list