To access the list object of outer class in the inner class in python -


class policy(object):      def __init__(self,name):          global policies_list          self.policy_1_list=[]          self.id=name          policies_list.append(self)       class policy_1:          def __init__(self):              policy_1_list.append(self) 

how use policy_1_list list object of outer class policy in constructor of inner class policy_1? how refer outer class element?


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -