Tom Harris a écrit :
Greetings,
I want to have a class as a container for a bunch of symbolic names
for integers, eg:
class Constants:
FOO = 1
BAR = 2
Do you have a reason to stuff them in a class ? Usually, putting them at
the top level of a module is quite enough...
Except that I would like to attach a docstring text to the constants,
so that help(Constants.FOO) will print some arbitrary string.
You can document them in the module or class docstring...
--
http://mail.python.org/mailman/listinfo/python-list