How to extend inner classes?
aleaxit at yahoo.com
Sun Nov 28 13:58:32 CET 2004
Kay Schluehr <kayschluehr at gmx.de> wrote:
> You can define a class variable Pos with the class Pos as its value
> class PeriodicGrid :
> class Pos:
> Pos = Pos
> >>> grid = PeriodicGrid()
> >>> grid.Pos()
> <__main__.Pos instance at 0x00EEFAD0>
You can, but that 'Pos = Pos' statement in this code is just as
redundant and useless as it appears. In every aspect, the behavior will
be exactly identical if you remove that assignment.
More information about the Python-list