Python Constant Class, Different Enum Implementation
The code looks decent, but there are a couple problems with the overall design:


"constants" can be changed (rebound) or removed from the class
the constants don't have a nice repr() (very useful for debugging)


To solve these problems, and more, check out the aenum library1 -- besides advanced Enum and NamedTuple implementations, it also has a Constant2 class.

Your code above would look like:

from aenum import Constant

class TypeNames(Constant):
    TYPE_A = 'Whatever you want it to be'
    TYPE_B = 'Another example'


and in use:

&gt;&gt;&gt; print(repr(TypeNames.TYPE_A))
&lt;TypeNames.TYPE_A: 'Whatever you want it to be'&gt;

&gt;&gt;&gt; print(TypeNames.TYPE_A)
Whatever you want it to be

&gt;&gt;&gt; try:
...     del TypeNames.TYPE_B
... except AttributeError as exc:
...    print(exc)
....
cannot delete constant &lt;TypeNames.TYPE_B&gt;

&gt;&gt;&gt; try:
...     TypeNames.TYPE_B = 'oops!'
... except AttributeError as exc:
...     print(exc)
...
cannot rebind constant &lt;TypeNames.TYPE_B&gt;




1 Disclosure:  I am the author of the Python stdlib Enum, the enum34 backport, and the Advanced Enumeration (aenum)  library.

2 Looking at your all() implementation I can see that should be added to Constant.