Assigning a name to a pattern-matched item in Python
<p>I'm trying to do the following:</p>

<pre><code>def f( a=(b,c,d) ):
  pass
</code></pre>

<p>But the interpreter complains that b is not defined when I do this. Is there a "Pythonic" way of getting the intended result? I know that I could do something like the following: </p>

<pre><code>def f( (b,c,d) ):
  a = (b,c,d)
  pass
</code></pre>

<p>But I'd rather a solution that didn't require me to repeat myself. Any ideas?</p>

<p><strong>Edit for clarification</strong>: What I am trying to do is have a function that can be called as follows:</p>

<pre><code>f( (1,2,3) )
</code></pre>

<p>Then, within the body of the function, the following names are assigned:</p>

<pre><code>a = (1,2,3)
b = 1
c = 2
d = 3
</code></pre>
