software design question
Josiah Carlson
jcarlson at nospam.uci.edu
Sat Feb 7 15:16:27 EST 2004
> So the question is rather: how to make a better design?
import module1
...
class main:
def __init__(self, args...):
self.c1 = module1.class1(args...)
#where args... is the standard initialization for your class,
# and any additional objects/methods that c1 needs
# access to.
Pass what is needed. If you can't pass what is needed when external
module classes are initialized, then set the attribute later.
c1instance.attribute = value
- Josiah
More information about the Python-list
mailing list