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

Nick Coghlan ncoghlan at gmail.com
Mon Feb 22 13:29:07 CET 2010

Eric Smith wrote:
> Plus, we're adding argparse. Do we really want both argparse and
> optparse to be coupled to warnings?

I agree with Titus - with the modules being peers rather than one being
obviously higher level than the other the dependency feels wrong no
matter which way it runs. And I'm a core developer that's been hanging
around on python-ideas for a long time* ;)

That said, the idea of creating a public API in the warnings module to
expose the functionality of warnings._processoptions in a clean fashion
seems like a reasonable idea that achieves the same goal without
coupling it to a particular command line parsing approach.


* Just so nobody takes that comment the wrong way, keep in mind that
things like this don't actually matter all that much in most
python-ideas discussions - whether or not you're talking sense is
usually far more important. I just couldn't resist pointing it out after
Titus's comment :)

Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list