python -W

אורי uri at speedy.net
Tue Jul 12 19:04:41 EDT 2022


Thank you.
אורי
uri at speedy.net


On Tue, Jul 12, 2022 at 10:09 PM MRAB <python at mrabarnett.plus.com> wrote:

> On 12/07/2022 18:39, אורי wrote:
> > Is `python -W all` and `python -Wa` the same? And what are the options
> > for  `python -W`? I didn't find it documented. For example, I'm using
> > `python -W error::DeprecationWarning` and I didn't see it documented on
> > https://docs.python.org/3/using/cmdline.html
> >
> > Is there a way to convert all warnings to exceptions and how?
> >
> It's documented on that page.
>
> It says """The action names can be abbreviated as desired and the
> interpreter will resolve them to the appropriate action name. For
> example, -Wi is the same as -Wignore."", so "python -Wa" is the same as
> "python -Walways".
>
> It also says """-Werror    # Convert to exceptions""", so "python
> -Werror" (or "python -We") will convert all warnings to exceptions.
> --
> https://mail.python.org/mailman/listinfo/python-list
>


More information about the Python-list mailing list