Steven D'Aprano <steve-remove-t...@cybersource.com.au> wrote: > Avoiding namespace pollution and information hiding are two good reasons > for nesting classes.
Python already has a great mechanism for regulating namespaces: modules & importing. Information hiding seems to go against the 'all consenting adults' ethos as well. > There's no need to expose the Node class, and no reason not to nest it. Well, other than maybe code reuse, that seems a good reason to me. Being able to modify the behaviour of someone else's class because they _haven't_ nested secondary class functionality within it would be a big plus too, even more so if the outer class instead takes a class or factory as part of its constructor. -- http://mail.python.org/mailman/listinfo/python-list