[TransWarp] lifting class families into Zope
Phillip J. Eby
pje at telecommunity.com
Sat Jan 18 12:05:44 EST 2003
At 05:23 PM 1/17/03 -0600, Daniel Mahler wrote:
>This sounds very much like what I have in mind.
>Will newmodule.Dog().liver return newmodule.Liver
>(I expect that the answer is
>"that depends on how you initialize the liver attribute",
>but I thought I would ask anyway)
Unless the code does "from oldmodule import Liver" or some equivalent
thereof, it's going to be newmodule.Liver. This also applies to things
like super(Liver,self) -- *all* globals used in newmodule are going to be
newmodule's globals, not oldmodule.
There are some minor limitations, however, compared to a "perfect" module
inheritance implementation. The docs'll tell you all about them.
More information about the PEAK