On Apr 22, 3:36 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote:
> When I go to create an object I want to be able to decide whether the
> object is valid or not in __init__, and if not, I want the constructor to
> return something other than an object, (like maybe None).
[...]

__init__ doesn't create an instance, it initializes it, i.e. does
things like settings some attributes, etc.  The method that creates
instances is called __new__ (see http://docs.python.org/ref/customization.html).

--
Arnaud

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to