How to dynamically add attributes to a class?
<p>I have many similar classes, they all contain their own 
class attributes: </p>

<pre><code>class MyClass1(): 
    Context = ClassId1+"CONTEXTSTR"
    SubContext = ClassId1+"SUBCONTEXTSTR"
    UpVal = ClassID+"UPVAL"
    DoenVal = ClassID1+"DOWNVAL"
class MyClass2(): 
    Context = ClassId2+"CONTEXTSTR"
    SubContext = ClassId2+"SUBCONTEXTSTR"
    UpVal = ClassID2+"UPVAL"
    DoenVal = ClassID2+"DOWNVAL"
...
</code></pre>

<p>but all this soon becomes annoying and requires a lot of code repetition (error-prone). </p>

<p>I would like to be able to manipulate a sort of class_variable and to do something like: </p>

<pre><code>class MyClass1():
    self_cls.MakeParameters(ClassId1)
</code></pre>

<p>even better if I could use inheritance and pass parameters to classes to do things like: </p>

<pre><code>ClassID1 = "test01"    

class MyClass1(BaseClass,&lt;ClassID1&gt;):
    pass

print MyClass1.CONTEXT
</code></pre>

<p>obtaining as output "test01CONTEXTSTR" the code. 
How to do set the arguments of classes according to a given "template" that takes a parameter? </p>
