[Python-bugs-list] [ python-Bugs-457431 ] '-' character breaks exception handling

noreply@sourceforge.net noreply@sourceforge.net
Fri, 31 Aug 2001 15:04:08 -0700


Bugs item #457431, was opened at 2001-08-31 15:04
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=457431&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: '-' character breaks exception handling

Initial Comment:
Catching a string based exception containing a '-' 
character that was raised within a function call 
cannot be explicitly caught. Example :

>>> def test() :
... 	raise 'Lock-Removed'
... 
>>> try :
... 	test()
... except 'Lock-Removed' :
... 	print 'Caught it!'
... 
Traceback (most recent call last):
  File "<interactive input>", line 2, in ?
  File "<interactive input>", line 2, in test
Lock-Removed
>>> try :
... 	raise 'Lock-Removed'
... except 'Lock-Removed' :
... 	print 'Caught it!'
... 
Caught it!



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

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