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

alex23 wuwei23 at gmail.com
Mon Oct 18 23:37:34 EDT 2010


Steven D'Aprano <st... at REMOVE-THIS-cybersource.com.au> 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