title: Python 3 defaultdict with lambda expression
body: <p>I have a code that was working in python 2, but now in python 3 raises the error "TypeError: keyword arguments must be strings". It is the first line of a function, so shouldn't be a problem with previous code. </p>
  
  <pre><code>   map = collections.defaultdict(lambda: 'blinn',**{0: 'constant', 1:'lambert'})
  </code></pre>
  
  <p>Maybe someone could also explain me what this line of code is doing and what is the "map" object that creates. I have found <a href="https://stackoverflow.com/questions/8419401/python-defaultdict-and-lambda">Python defaultdict and lambda</a> but I still have problems in understanding this line of code.</p>