I want to set up a class that will abort during instance creation based on the value of the the argument passed to the class. I\'ve tried a few things, one of them being raising
Just raise an exception in the initializer:
class a(object): def __init__(self, x): if not x: raise Exception()