python: how to pass a context to a function
<p>What is the correct way to pass a context (with no specific type) to a function? 
There are multiple methods, each accepting a context in their signature. Each function knows what variable it should look into context (in the example below f1 knows it should look for "a"). I can't figure out how I can define context and set a value to one of it's properties.</p>

<p>I am writing this with C background in mind, so it might look a little bit awkward in python world, and any suggestion how to redo this whole thing is also accepted. In C, context should be defined completely for all the variables it might set. In python since it's dynamic I am under the impression that we should not need a type for the context variable, but then I am not sure without defining context how I can set context.a. </p>

<p>A simplified example of what I am trying to do is shown below:</p>

<pre><code>def f1(context):
    a = context.a
    print "a: " + a

def f2(context):
    b = context.b
    print "b: " + b

context1.a = "testing1"
f1(context1)

context2.b = "testing2"
f2(context2)
</code></pre>