On Apr 27, 2010, at 2:50 PM, Chris G wrote:

> Raising an Exception would be the usual way.
> 
> -Chris

i re-read the original email and wanted to clarify what i wrote.  say you 
define a class that is a subclass of another:


class MyClass(MyAbstractClass):
        pass

if you want to raise an error at this point in the code, you need metaclasses.  
if you want to raise an error here:

c = MyClass('arg1', 'arg2')

just raise an Exception in the class's __init__ method.

-chad





-- 
http://groups.google.com/group/python_inside_maya

Reply via email to