title: TypeError: must use keyword argument for key function
body: <p>This seems to be a syntax error.</p>
  
  <p>Here is the calling function which should be correct.</p>
  
  <pre><code>t.sort(key=lambda b: b.length // 2)
  </code></pre>
  
  <p>Here is the function</p>
  
  <pre><code>def sort(self, key=None):
      p=self.boxes
      p.sort(key)
      return
  </code></pre>
  
  <p>p is a list inside a class. I am not sure how to get this to sort correctly.</p>