C++ namespaces are useful for encapsulating related objects within a 
single file, subdividing the global namespace without using classes. 
Python has modules, but they come in separate files.

Using Python 3.3's ChainMap type, and some metaclass trickery, I abuse 
the class keyword to (almost) emulate C++ namespaces:

http://code.activestate.com/recipes/578279/




-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to