May 19, 2007
3:51 a.m.
"Niko Matsakis" <niko@alum.mit.edu> wrote in message news:FF531020-FE60-47B2-A30F-CB13D6E696F0@alum.mit.edu... |I guess the question is whether people consider the ability to throw | arbitrary objects (rather than only those whose type is a subtype of | Exception) a feature or a bug. | | I'm on the fence myself: it makes translating to the jvm and clr | easier if we prohibit arbitrary objects, and it seems like a marginal | use-case, but on the other hand, well, Python can do it, so why not? 'Python can do it'??? In 2.4, only throw (old-style) classes or instances thereof or (deprecated) strings. In 2.5, I believe base exception was made new style. In 3.0, I expect subtype thereof will be enforced. tjr