[Python-Dev] Add a developer mode to Python: -X dev command line option

Victor Stinner victor.stinner at gmail.com
Thu Nov 16 12:00:38 EST 2017

My draft addition to the -X dev doc:
The developer mode is different from the "debug mode" of some modules of the
standard library which enables a lot of debug logs. The developer mode should
only log a warning if a potential bug is detected.

The developer mode has a limited effect. Many modules of the standard library
have their own "debug mode" which is not enabled in the developer mode. See
also the :data:`__debug__` flag disabled by the :option:`-O` option, and
:data:`sys.flags.debug` enabled by the :option:`-d` option.

You forgot the infamous -d option!

Honestly, I never used __debug__ nor sys.flags.debug.

I like adding yet another option to confuse people a little bit more!


2017-11-16 17:52 GMT+01:00 Antoine Pitrou <antoine at python.org>:
> Le 16/11/2017 à 17:42, Victor Stinner a écrit :
>> Running an application in debug mode or "developer mode" was never
>> recommanded by anyone.
> I don't know.  Almost everyone runs Python with __debug__ set to True :-)
> Regards
> Antoine.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com

More information about the Python-Dev mailing list