title: What's the point of using [object instance].__self__?
body: <p>I was checking the code of the toolz library's <a href="https://github.com/pytoolz/toolz/blob/e9bc1e150b7b1ea1bec300a55382ed564b215f41/toolz/itertoolz.py#L72-L105" rel="noreferrer"><code>groupby</code> function</a> in Python and I found this:</p>
  <pre class="lang-py prettyprint-override"><code>def groupby(key, seq):
      &quot;&quot;&quot; Group a collection by a key function
      &quot;&quot;&quot;
      if not callable(key):
          key = getter(key)
      d = collections.defaultdict(lambda: [].append)
      for item in seq:
          d[key(item)](item)
      rv = {}
      for k, v in d.items():
          rv[k] = v.__self__
      return rv
  </code></pre>
  <p>Is there any reason to use <code>rv[k] = v.__self__</code> instead of <code>rv[k] = v</code>?</p>