From: Geoffrey T. <gta...@na...> - 2003-01-08 15:49:44
|
I don't think this patch will work properly if the inheritance is more than one level deep. It needs to be a depth-first search through the inheritance hierarchy, or something like that. Did you test that? What is the purpose of initPSP() anyhow? It's always empty. Why can't we just remove it? Then we could also remove the awake() method from the generated code and avoid the whole problem. - Geoff > -----Original Message----- > From: Luke Holden [mailto:lh...@eb...] > Sent: Tuesday, January 07, 2003 11:30 PM > To: Ian Bicking > Cc: Webware devel > Subject: Re: [Webware-devel] Bug with PSP and using mixins > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > def awake(self.trans): > > for baseclass in self.__class__.__bases__ > > if ... (code to check if the method exists?): > > baseclass.awake(self, trans) > > break > > self.initPSP() > > > > This should should hopefully make calling the awake method > simular to how > > Python looks up methods in parent classes.... So the first class to > > implement the method is the one which gets used for that method. > > Okay... I've implemented this change... and it looks like it > works wonderfully > =) > > See attached patch. > > Now.... how does one get a patch into the webware tree? =) > > - -- > Luke Holden > eBI Solutions > Main: (949) 387-5182 > Email: lh...@eb... > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.1 (GNU/Linux) > > iD8DBQE+G6lB3q5xXfLZTQkRAs+GAKCVGnXLSbQGMAzr1Mahck4BQ2z/yQCfV4z1 > wFeYP22qoOOPW63x2U6JNCo= > =r3tb > -----END PGP SIGNATURE----- > |