Exceptions in C that apply to multiple types?

"Martin v. Löwis" martin at v.loewis.de
Tue May 20 15:07:48 EDT 2003


Elf M. Sternberg wrote:

> I would like to have a base class of unique exceptions that apply to all
> kernel modules that I'm manipulating.  Is in as easy as writing a core
> of exceptions and making sure they get instantiated into the running
> python process when __init__.py is called, and then simply referring to
> them by name when needed?

I think you want PyErr_NewException.

Martin





More information about the Python-list mailing list