nest class name problem

Bob van der Poel bvdpoel at uniserve.com
Mon Jun 19 20:18:11 EDT 2000


Yes, but I'm using __name to keep the variable private/static to a
particular instance of the Goption(). 

Rainer Deyke wrote:
> 
> Jeff Massung <jmassung at magpiesystems.com> wrote in message
> news:riu35.36$JM5.4708 at news.uswest.net...
> > I'm still learning, but lemme take a crack and let others correct me ;)
> >
> > __name isn't a member of MyDialog class, so you can't use self with it,
> > because then it looks for MyDialog.__name, which doesn't exist. But
> perhaps
> > you can use Goption.__name instead of self.__name?
> 
> This would indeed work if it wasn't for name mangling.  Don't call it __name
> if you want to access it from a nested class.
> 
> --
> Rainer Deyke (root at rainerdeyke.com)
> Shareware action/role-playing games      -      http://rainerdeyke.com
> "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

-- 
   __
  /  )      /         Bob van der Poel
 /--<  ____/__        bvdpoel at uniserve.com
/___/_(_) /_)         http://users.uniserve.com/~bvdpoel




More information about the Python-list mailing list