This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jemfinch
Recipients
Date 2003-12-18.23:55:52
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In 2.2, it would dynamically turn off asserts: 
 
Python 2.2.3+ (#1, Sep 30 2003, 01:19:08) 
[GCC 3.3.2 20030908 (Debian prerelease)] on linux2 
Type "help", "copyright", "credits" or "license" for more 
information. 
>>> __debug__ 
1 
>>> __builtins__.__debug__ = 0 
>>> assert 0, "There should be nothing raised." 
>>> 
 
But in 2.3, this changed: 
 
Python 2.3.2 (#2, Nov 11 2003, 00:22:57) 
[GCC 3.3.2 (Debian)] on linux2 
Type "help", "copyright", "credits" or "license" for more 
information. 
>>> __debug__ 
True 
>>> __builtins__debug__ = False 
>>> assert 0, "There should be nothing raised." 
Traceback (most recent call last): 
  File "<stdin>", line 1, in ? 
AssertionError: There should be nothing raised. 
>>> 
 
If this is in fact the intended behavior (I hope it's not) then 
what's an application author to do when he wants to offer 
users a -O option *to his application* that turns off asserts? 
History
Date User Action Args
2007-08-23 14:18:57adminlinkissue862600 messages
2007-08-23 14:18:57admincreate