Purpose of `return self` from a class method?
<p>I came across something like this in an open-source project. Methods that modify instance attributes return a reference to the instance. Would you trust code that is written like this? </p>

<pre><code>class Foo(object):

  def __init__(self):
    self.myattr = 0

  def bar(self):
    self.myattr += 1
    return self
</code></pre>
