You must define __new__for this:
class Foo(object):
def __new__(cls, arg):
if arg > 10:
return None
return super(Foo, cls).__new__(cls)
print Foo(1)
print Foo(100)
, __init__ :
class Foo(object):
def __init__(self, arg):
if arg > 10:
raise ValueError("invalid argument!")