Raising objects

Michael Chermside mcherm at mcherm.com
Thu May 1 14:07:13 EDT 2003


> > Allowing only [a] subclasses of (say) NewException, a hypothetical
> > new newstyle class; or [b] classic classes, and [c] strings, to
> > be raised, with b and c there only for backwards compatibility,
> > is FAR simpler, neater, easier to explain, and more pragmatical.
> 
> For what it's worth, I agree with Alex that you should only be allowed
> to raise these three things. The only thing I'd change would be the
> name of NewException (and I'd only change it if I could come up with
> a better name!).

Hmmm... I should clarify. I think that you should be allowed to raise
subclasses of NewException AND instances of subclasses of NewException
just as we allow today with classic classes.

-- Michael Chermside






More information about the Python-list mailing list