Python function argument scope (Dictionaries v. Strings)
<pre><code>foo = "foo"
def bar(foo):
    foo = "bar"

bar(foo)
print foo

# foo is still "foo"...

foo = {'foo':"foo"}
def bar(foo): 
    foo['foo'] = "bar"

bar(foo)
print foo['foo']

# foo['foo'] is now "bar"?
</code></pre>

<p>I have a function that has been inadvertently over-writing my function parameters when I pass a dictionary. Is there a clean way to declare my parameters as constant or am I stuck making a copy of the dictionary within the function?</p>

<p>Thanks! </p>
