[ python-Bugs-1077862 ] assert fail to threw exception when run python with '-O'

SourceForge.net noreply at sourceforge.net
Thu Dec 2 21:02:53 CET 2004


Bugs item #1077862, was opened at 2004-12-02 20:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1077862&group_id=5470

Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: tj128 (tj128)
Assigned to: Nobody/Anonymous (nobody)
Summary: assert fail to threw exception when run python with '-O'

Initial Comment:
in both 2.3 and 2.4 version, if you run 'python -O', 
assert fail to threw excetption when it should.

example

>python -O
Python 2.3.3 (#4, Apr 11 2004, 12:01:37) 
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-20)] on linux2
Type "help", "copyright", "credits" or "license" for more 
information.
>>> try:
...  assert(1==2)
...  print 'yyy'
... except:
...  print 'zzz'
... 
yyy
>>> 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1077862&group_id=5470


More information about the Python-bugs-list mailing list