What do @ and lambda mean in Python?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/739654/understanding-python-decorators">Understanding Python decorators</a>  </p>
</blockquote>



<p>Just trying to "port" some Python code to Java, I came then across the following
funny Python line:</p>

<pre><code> @fake(lambda s, t, n: [(s.field(i+1), s) for i in range(n)])
 def split(secret, threshold, num_players):
     shares = []
     for i in range(1, num_players+1):
      # do some shares calculation
return shares
</code></pre>

<p>There are quite some interesting constructs in this one that I never noticed before. Could anyone tell me what is the deal with this @fake thingy?</p>

<pre><code>def fake(replacement):
    """Replace a function with a fake version.
    def decorator(func):
        fakes = os.environ.get('FUNC_FAKE', '')
        if fakes == '*' or func.__name__ in fakes.split():
            return replacement
        else:
            return func
return decorator
</code></pre>

<p>Further, does this lambda stand for a function name or what is the deal with that?</p>
