where to create the object

Oivvio Polite oivvio at cajal.mbb.ki.se
Fri Mar 3 04:24:54 EST 2000


hi everyone.
this is only my first week with python and oo. but i've gone through the
tutorial, the library reference and kind of browsed the faq so i think
that i'm entitled to start throwing in stupid questions.

here goes the first one:

the method  result of class foo generates a the result object bar.
the bar object could either created in the result method and returned to
the calling program.
or it could be created in the calling program, supplied as an argument
to result that results just fills up with the right values.

my gut feeling is that the first choice is a better design but that the
second choice is less costly in terms of both memory and time.

what are your any rules of thumb?

oivvio

-- 
oivvio polite
varvsgatan 10a / 117 29 stockholm
mobil  0709 304030
kontor 6696418
hem    7919084
fax    840018
mailto:oivvio at polite.se




More information about the Python-list mailing list