[Python-ideas] Show deprecation warnings in the interactive interpreter

Antoine Pitrou solipsis at pitrou.net
Thu Feb 26 16:48:17 CET 2015


On Thu, 26 Feb 2015 15:35:00 +0000
Brett Cannon <brett at python.org> wrote:

> On Wed, Feb 25, 2015 at 5:40 PM Victor Stinner <victor.stinner at gmail.com>
> wrote:
> 
> > Hi,
> >
> > Python has more and more options to emit warnings or enable more checks.
> > Maybe we need one global "strict" option to simply enable all checks and
> > warnings at once?
> >
> > For example, there are deprecation warnings, but also resource warnings.
> > Both should be enabled in the strict mode. Another example is the -bb
> > command line option (bytes watning). It should also be enabled. More
> > example: -tt (warnings on indentation).
> >
> > It can be a command line option, an environment variable and a function to
> > enable it.
> >
> > Perl has "use strict;".
> >
> > For the interactive interpreter, the strict code may be enabled by
> > default, but only if it's easy to disable it.
> >
> 
> Regardless of this REPL discussions, having something like a --strict flag
> to switch on every single warning that you can switch on to its highest
> level would be handy to have.

Isn't that "-Walways" ? (IIRC)

Regards

Antoine.




More information about the Python-ideas mailing list