nest class name problem

Rainer Deyke root at rainerdeyke.com
Mon Jun 19 19:36:47 EDT 2000


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





More information about the Python-list mailing list