Brian van den Broek wrote: > Bruno Desthuilliers said unto the world upon 25/04/06 06:52 PM: > >> Duncan Booth a écrit : >> (snip) >>> Apart from the fact that you can delete the method 'dothis' from both >>> classes with no effect on the code? >> >> Mmmm... Oh, I see. Agreed, this is not a very good example. > > <snip> > > This hobbyist isn't seeing Duncan's point. Wouldn't deleting the dothis > method from both classes lead to an AttributeError as Base.__init__ > calls self.dothis()?
Yes, of course. But Duncan (implicitely) meant "deleting the method *and* the calls to the method". The point is that dothis() returns a value (that is not used), and doesn't modify the state of self. Or at least, this what *I* understood. > Is the point that one could refactor out the self.dothis() from the > __init__? Or something else altogether? (I assume it can't be that > dothis isn't doing real work as it is in the context of a toy example.) Seems like you are assuming too much !-) -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list