Fairly new to Python (and loving it!)

In C++ (gack!) I got used to creating a helper function with each class to 
check the class object initialisation parameters prior to creating the 
object.

In Python, this would be
-----------------------------------------------
import example

if example.ParametersOK(a, b, c, d):
    newObj = example.Example(a, b, c, d)
else:
    print "Error in parameters"
-----------------------------------------------

I presume this would still be considered good practise in Python, or is 
there some other, preferred, method?


Cheers,
Brett McSweeney



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

Reply via email to