And what happen if the Class A is in a package PA. Clabb B is in a package PB. How do you access the namespace of PA from PB ? When I have tried, the inherited methods from A where not visible from B, and I and to recreate a copie of the method. (which is ugly !!!). Any suggestion ? Thierry Nabeth Research Fellow INSEAD CALT (the Centre for Advanced Learning Technologies) http://www.insead.fr/CALT/ ------------------------------------------ From: "Andy McKay" <AndyM@ActiveState.com> To: "Daniel Rusch" <drusch@globalcrossing.com>, <zope@zope.org> Subject: Re: [Zope] Product inhetitance question Date: Thu, 17 Aug 2000 08:54:49 -0700 charset="iso-8859-1"
Say I have a fully functional (and more importantly, working) Product will call A.
I want to extend this Product's capabilities so I wish to derive another class from it, call it B.
No problem,
class B(A): .........
The question is, (I think the answer is no) is there a way to inherit (i.e. reuse common code and extend it) the manage_Add function and the dtml files from A???
Well by inheritance B has all the methods, properties etc you have in A. So the answer is yes, if A has the foobar method then B will have a foobar method. Or do I misunderstand your question? -- Andy McKay, Developer, ActiveState http://www.ActiveState.com Programming for the People ------------------------------------------