Guido van Rossum <guido@python.org> writes:
> Can someone provide a reason why you'd want to use nested classes?
> I've never felt this need myself. What are the motivations?
>
Nested classes provide a nice way (IMO) to write metaclasses and keep
them near the classes using them:
class X(object):
class __metaclass__(type):
....
Thomas