Classes in a class: how to access variables from one in another

alex23 wuwei23 at
Tue Oct 19 05:37:34 CEST 2010

Steven D'Aprano <st... at> wrote:
> I'll accept that nested classes are unusual, but unPythonic? Never!

Not even if "flat is better than nested" ;)

And are you the same Steven D'Aprano who once wrote:

"Never nest classes, unless you need to, or to win a bet."

Given that there's little if anything gained from nesting classes
(other than possible scoping confusion) is there ever a need?

More information about the Python-list mailing list