title: Differences between functools.partial and a similar lambda?
body: <p>In Python, suppose I have a function <code>f</code> that I want to pass around with some secondary arguments (assume for simplicity that it's just the first argument that remains variable).</p>
  
  <p>What are the differences between doing it these two ways (if any)?</p>
  
  <pre><code># Assume secondary_args and secondary_kwargs have been defined
  
  import functools
  
  g1 = functools.partial(f, *secondary_args, **secondary_kwargs)
  g2 = lambda x: f(x, *secondary_args, **secondary_kwargs)
  </code></pre>
  
  <p>In the <a href="http://docs.python.org/library/functools.html">doc page for <code>partial</code></a>, for example, there is this quote:</p>
  
  <blockquote>
    <p><code>partial</code> objects defined in classes behave like static methods and do not transform into bound methods during instance attribute look-up.</p>
  </blockquote>
  
  <p>Will the lambda-method suffer from this if used to make a class method from arguments supplied to the class (either in the constructor or through a function later on)?</p>