title: Is there a clever way to pass the key to defaultdict's default_factory?
body: <p>A class has a constructor which takes one parameter:  </p>
  
  <pre><code>class C(object):
      def __init__(self, v):
          self.v = v
          ...
  </code></pre>
  
  <p>Somewhere in the code, it is useful for values in a dict to know their keys.<br>
  I want to use a defaultdict with the key passed to newborn default values:  </p>
  
  <pre><code>d = defaultdict(lambda : C(here_i_wish_the_key_to_be))
  </code></pre>
  
  <p>Any suggestions?</p>