returning self

Dennis Heuer <[email protected]> Fri, 26 Mar 2004 17:14:31 +0100
Newsgroups gmane.comp.lang.prothon.devel
Message-ID <1080317668.1405.94.camel@Knoppix>
I disagree with you that a function should return self. At least if self
is True. I use the return of none as an indicator in that I ask:

if thingsHappened(): go on!

or:

if not thingsHappened(): raise MyError

That's a very useful functionality in very many cases and trumps your
single advantage you mentioned (__init__).

regards,

Dennis