[Python-ideas] warnings package might provide an Option or a pre-filled OptionParser
C. Titus Brown
ctb at msu.edu
Sun Feb 21 16:02:07 CET 2010
On Sun, Feb 21, 2010 at 03:39:42PM +0100, Masklinn wrote:
> On 21 Feb 2010, at 15:28 , C. Titus Brown wrote:
> > warnings is a Python developer issue.
> > optparse provides command line arguments for users to make use of.
> > Generally, when running things from the command line, I shouldn't care about
> > what language (or language version, or internal details of that language)
> > I'm using.
> There are cases where the user is a python developers and might want to manipulate warnings e.g. a web framework's development server or a pluggable tool where one is developing new plugins within the tool, in both cases the startup script is often called directly, not using an explicit python call. Though I didn't quite remember to describe those use cases when I made the initial proposal. Providing the option or not would be left at to the tool creator's judgement.
OK, I wouldn't be planning on using it, but I can see that it might be useful
I like Greg's idea of putting it into optparse over warnings because the
dependency link is more appropriate; optparse is not related to language
behavior, like warnings is. Plus there's been some recent movement on
the idea that optparse may be deprecated (silently or otherwise...) in
future Python releases.
Whatever you decide, Antoine has said "go for it" -- make up a patch
and see what happens ;).
C. Titus Brown, ctb at msu.edu
More information about the Python-ideas