Raising objects

Michael Chermside mcherm at mcherm.com
Thu May 1 14:04:47 EDT 2003


Alex writes:
> 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!).

-- Michael Chermside





More information about the Python-list mailing list