OOP - how to abort an __init__ when the initialisation code fails ?
R.Wieser
address at not.available
Mon Nov 4 14:04:14 EST 2019
Luciano,
> """A failed __init__ should raise an appropriate exception. A bare
> return or returning None is what any __init__ is expected to do in the
> normal case, so it signals success."""
Ah, that settles it than.
Somehow I thought that a return (of "none") there indicated an error result,
causing the object to return .. something empty.
Thanks.
Regards,
Rudy Wieser
More information about the Python-list
mailing list