[Python-ideas] Show deprecation warnings in the interactive interpreter
Serhiy Storchaka
storchaka at gmail.com
Wed Feb 25 12:17:04 CET 2015
More information about the Python-ideas mailing list
Wed Feb 25 12:17:04 CET 2015
- Previous message: [Python-ideas] Show deprecation warnings in the interactive interpreter
- Next message: [Python-ideas] Show deprecation warnings in the interactive interpreter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 25.02.15 11:55, Steven D'Aprano wrote:
> I think there are three questions that should be asked:
>
> (1) How does one easy and simply enable warnings in the interactive
> interpeter?
Same as for other warnings.
import warnings; warnings.simplefilter('once', DeprecationWarning)
Or 'module', 'always', 'error'.
> (2) If they are enabled by default, how does one easily and simply
> disable the again? E.g. from the command line itself, or from your
> PYTHONSTARTUP file.
Same as for other warnings.
import warnings; warnings.simplefilter('ignore', DeprecationWarning)
- Previous message: [Python-ideas] Show deprecation warnings in the interactive interpreter
- Next message: [Python-ideas] Show deprecation warnings in the interactive interpreter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list