How to extend inner classes?

Kay Schluehr kayschluehr at gmx.de
Sat Nov 27 16:31:42 EST 2004


You can define a class variable Pos with the class Pos as its value

class PeriodicGrid :
    class Pos:
	pass            
    Pos = Pos 

>>> grid = PeriodicGrid()
>>> grid.Pos()
<__main__.Pos instance at 0x00EEFAD0>

Ciao
    Kay
 







More information about the Python-list mailing list