[issue821] __debug__ is always True
New submission from dag <dag.odenhall@gmail.com>: Python 2.7.1 (b590cf6de419, Apr 30 2011, 02:00:34) [PyPy 1.5.0-alpha0 with GCC 4.4.3] on linux2
sys.flags.optimize, __debug__ (1, True)
---------- messages: 2909 nosy: dag, pypy-issue priority: bug release: 1.5 status: unread title: __debug__ is always True ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue821> ________________________________________
Armin Rigo <armin.rigo@gmail.com> added the comment: pypy ignores the -O option. We decided it was ok a long time ago. Maybe we should reconsider now? (It seems that -O has the effect of setting sys.flags.optimize to 1, since we ported pypy to Python 2.7, but that's it) ---------- nosy: +arigo status: unread -> chatting ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue821> ________________________________________
dag <dag.odenhall@gmail.com> added the comment: I would argue it should at least set __debug__ = True even if it doesn't do the bytecode stripping, so that "if __debug__" code works as expected. ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue821> ________________________________________
Carl Friedrich Bolz <cfbolz@gmx.de> added the comment: This works correctly nowadays, including not running asserts when -O is given. ---------- nosy: +cfbolz status: chatting -> resolved ________________________________________ PyPy bug tracker <tracker@bugs.pypy.org> <https://bugs.pypy.org/issue821> ________________________________________
participants (3)
-
Armin Rigo
-
Carl Friedrich Bolz
-
dag