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.

Victor

Le mercredi 25 février 2015, Serhiy Storchaka <storchaka@gmail.com> a écrit :
What you are think about turning deprecation warnings on by default in the interactive interpreter?

Deprecation warnings are silent by default because they just annoys end user that uses old Python program with new Python. End user usually is not a programmer and can't do something with warnings. But in the interactive interpreter the user is the author of executed code and can avoid to use deprecated functions if warned.

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/