Larry Bates wrote:

> Proper way is:
> 
> class One:
>     def __init__(self):
>         self.Two=Two()
> 
> Of course Two must be a proper class definition also.
> 
> class Two:
>     def __init__(self):
>         self.Three=Three()
> 
> class Three:
>     pass

just as a side note probably it would be better to use new style classes in
newly written code:

class One(object):
    def __init__(self):
        whatever

don't forget to call __init__ on new style classes otherwise you can pass
arbitrary arguments when instantiating the class e.g.:

one = One(a, b)

but python will silently ignore them and you probably won't like it...

cheers
-- 
Gian Mario Tagliaretti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to