On 2/4/11, Bill Felton <[email protected]> wrote: > Um, yes, emphatically yes. You missed the context, which was Smalltalk, and > it is terms of Smalltalk that my reply is couched. > Yes, Python returns None. > Smalltalk returns self by default. > Given the dropped context, you are correct. > Given the context meant, I am. I was following this until now... what is this smalltalk and drop? > > regards, > Bill > > On Feb 4, 2011, at 9:28 AM, Emile van Sebille wrote: > >> On 2/4/2011 5:35 AM Bill Felton said... >> >>> Um, not quite correct -- methods *without a specified return value* >>> always return self, that is, the object which executed the method. >> >> Um, no. They return None. >> >> >>> class Test: >> ... def __init__(self):pass >> ... def test(self):pass >> ... >> >>> a=Test().test() >> >>> a >> >>> print a >> None >> >>> >> >> Emile >> >> _______________________________________________ >> Tutor maillist - [email protected] >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor > > _______________________________________________ > Tutor maillist - [email protected] > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor >
-- Have a great day, Alex (msg sent from GMail website) [email protected]; http://www.facebook.com/mehgcap _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
