On Fri, Mar 26, 2010 at 10:49 AM, kj <no.em...@please.post> wrote: > > > What's the word on using "classes as namespaces"? E.g. > > class _cfg(object): > spam = 1 > jambon = 3 > huevos = 2 > > breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos)
Classes as namespaces are a valid use case (I do it all the time). Python 3 has a small cleanup that makes classes even closer to module namespaces; namely the concept of "unbound methods" goes away. In 3.x when you get a function from a class you get the function itself and not an unbound function. -Jack -- http://mail.python.org/mailman/listinfo/python-list