I suggest doing it the other way around:
from modules import SmallClass
from modules import AnotherClass
class BigClass(object):
def __init__(self, server=None):
"""construct the big class"""
self.reset_class(server)
def reset_class(self, server=None):
"""reset the big class"""
self.server = server
self.small_class = SmallClass(self.server)
self.another_class = AnotherClass(small_class)
This pattern is quite common as it allows __init__
to reset the class and you can separately reset the class as well. I have also seen this pattern in other object-oriented languages such as Java.