nested classes

Stefan Seefeld seefeld at
Mon Jun 18 12:32:58 EDT 2001

hi there,

I'd like to provide a hierarchy of config data by means of
nested classes and static variables, such as:

class A:
    class B:
	datadir = A.prefix + '/share'

however, I get a NameError: name 'A' is not defined

What am I doing wrong ? The above is possibly a bit driven
by my C++ programming style. What is the python way of doing
this ?


More information about the Python-list mailing list