Dethe Elza wrote: <lots of reasonable stuff on trampolining> > > class MyTrampolinedThing(object): > ... > > def doYourThing(self, x,y,z): > klas = self.__class__ > if isThisAMac(): > klas.doYourThing = klas._doMacThing > elif isThisWindows(): > klas.doYourThing = klas._doWindowsThing > elif isThisLinux(): > klas.doYourThing = klas._doLinuxThing
_but_, I have a problem with the next three lines: > del klas._doMacThing > del klas._doWindowsThing > del klas._doLinuxThing There is no reason to destroy the source of the method, nor even the other (presumably unused) methods. The Pythonic way is to leave them alone with the underscores in front, and expect programmers not to use them. > return self.doYourThing(x,y,z) --Scott David Daniels [EMAIL PROTECTED] _______________________________________________ Edu-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/edu-sig
