Newby Q: nested classes, access of upper method

Gregor Horvath g.horvath at mx.at
Sat Dec 4 02:52:57 EST 2004


Hello,

class A(self):
   def A1():
     pass

     class B(self):
       def B1():
	#************************************
         #***  How can I access A1 here???? ***
	#************************************
	self.A1() # doesnet work because self references to  B
	self.self.A1() #doesnt work either


Renanimg class B(self1): doesnt work either because self is not bound.

How can I access a method of a "upper" class?

--
Greg

			



More information about the Python-list mailing list