Clean way to not get object back from instantiation attempt gone bad

tobiah st at tobiah.org
Tue Aug 15 19:04:12 EDT 2006


Suppose I do:


myfoo = Foo('grapes', 'oranges')

And in the __init__() of Foo, there is
a real problem with the consumption of fruit.
Is there a clean way to ensure that myfoo
will be None after the call?  Would the
__init__() just do del(self), or is there
a better way to think about this?

Thanks,

Toby

-- 
Posted via a free Usenet account from http://www.teranews.com




More information about the Python-list mailing list