title: Sorting a list of objects, TypeError: unorderable types
body: <p>I am trying to sort a list of objects but i am receiving the following errors:</p>
  
  <pre><code>subredditlist.sort(key=lambda x: x.count)
    TypeError: unorderable types: builtin_function_or_method() &lt; builtin_function_or_method()
  </code></pre>
  
  <p>The code in question:</p>
  
  <p>main.py:</p>
  
  <pre><code>for k, v in smapped.items():
       rlist.append(objclist(k, v))
   rlist.sort(key=lambda x: x.count)
  </code></pre>
  
  <p>where subsmapped is a dictionary</p>
  
  <p>objclist.py:</p>
  
  <pre><code>class objclist:
      def __init__(self, name, count):
          self.name = name
          self.count = count
  </code></pre>