> What if make the default value depending on the debug level? In debug mode > it is "pdb.set_trace", in optimized mode it is "0". Then in production > environments you can use -E -O for ignoring environment settings and disable > breakpoints.
I don't know what is the best option, but I dislike adding two options, PYTHONBREAKPOINT and -X nobreakpoint, for the same features. I would become complicated to know which option has the priority. I would prefer a generic "release mode" option. In the past, I proposed the opposite: a "developer mode": https://mail.python.org/pipermail/python-ideas/2016-March/039314.html "python3 -X dev" would be an "alias" to "PYTHONMALLOC=debug python3.6 -Wd -bb -X faulthandler script.py". Python has more and more options to enable debug checks at runtime, it's hard to be aware of all of them. My intent is to run tests in "developer mode": if tests pass, you are sure that they will pass in the regular mode since the developer mode only enables more checks at runtime, it shouldn't change the behaviour. It seems like the consensus is more to run Python in "release mode" by default, since it was decided to hide DeprecationWarning by default. I understood that the default mode targets end users. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com