I want something like this. I cannot pass pass the parent instance to Child class
class Outer:
def __init__(self, logging):
self.logging
self.logger = logging.getLogger('Parent')
class Inner(SomeBaseClass):
def __init__(self, *args):
Outer.logger.info('initializing Child with %', ' '.join(args))
logging.config.fileConfig('logging.conf')
outerObject = Outer(logging)
.
.
.
# both inner1 and inner2 use same logger object
# intent: no need to pass the logger
inner1 = outerObject.Inner('xyzz')
inner2 = outerObject.Inner('abc')
how to implement this? or any better method to do the same?