[Tutor] do_it()
Eddie Comber
python at comber.cix.co.uk
Thu Dec 11 10:22:05 EST 2003
I see that often when people write OO code they have a main() something
like:
obj = myObject(param, param, param)
obj.do_it() #or obj.action() etc
Are there any commanding advantages to making this sort of functionality
into an object?
The above example is easier written and used as:
myfunc(param, param, param)
I ask because I have just written a MAKE utility, and having started off as
an object I really don't know what the advantages are above a simple
function.
Best,
Eddie.
More information about the Tutor
mailing list