[Tutor] Class as Exception

Bob Gailer ramrom@earthling.net
Sat Feb 8 17:31:36 2003


--=======4E682C45=======
Content-Type: text/plain; x-avg-checked=avg-ok-2E59145B; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

A couple of times I got the following to work. Now I just get an exception.

 >>> class n(str):pass
 >>> raise n, 'tst'
Traceback (most recent call last):
   File "<interactive input>", line 1, in ?
TypeError: exceptions must be strings, classes, or instances, not type

Why would the same code work, then fail?

Bob Gailer
mailto:ramrom@earthling.net
303 442 2625

--=======4E682C45=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-2E59145B
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/2003

--=======4E682C45=======--