[Zope] RE[2]: [Zope] Product inheritance question (similar question)

NABETH Thierry Thierry.NABETH@insead.fr
Mon, 21 Aug 2000 21:26:40 +0200


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C00BA4.FAB3BFC0
Content-Type: text/plain;
	charset="iso-8859-1"


>> from PA import A, ..... <whatever you need>

I am only using dtml and not writing directly python code !
So I do not believe this is possible.

>> Almost unbelievable.

But true.
But I will have again to do some test. 
(I do not have the time right now, and I did most of my
test with the previous version of Zope)

What I will have to do:
- create a Package (Zope product).
- create a class in this package, and a method (my_method)
- create another package.
- create a class in this package that inherits the class of the other
package.

- check that the method my_method is visible from within the second package.

Thierry Nabeth
Research Fellow
INSEAD CALT (the Centre for Advanced Learning Technologies)
http://www.insead.fr/CALT/



-----Original Message-----
From: Dieter Maurer [mailto:dieter@handshake.de]
Sent: Friday, August 18, 2000 9:49 PM
To: NABETH Thierry
Cc: 'zope@zope.org'
Subject: RE: [Zope] Product inhetitance question (similar question)


NABETH Thierry writes:
 > 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 ?
from PA import A, ..... <whatever you need>

class B(A): ....

 > 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 !!!).
Almost unbelievable.


Dieter

------_=_NextPart_001_01C00BA4.FAB3BFC0
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>RE[2]: [Zope] Product inheritance question (similar question)</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=2>&gt;&gt; from PA import A, ..... &lt;whatever you need&gt;</FONT>
</P>

<P><FONT SIZE=2>I am only using dtml and not writing directly python code !</FONT>
<BR><FONT SIZE=2>So I do not believe this is possible.</FONT>
</P>

<P><FONT SIZE=2>&gt;&gt; Almost unbelievable.</FONT>
</P>

<P><FONT SIZE=2>But true.</FONT>
<BR><FONT SIZE=2>But I will have again to do some test. </FONT>
<BR><FONT SIZE=2>(I do not have the time right now, and I did most of my</FONT>
<BR><FONT SIZE=2>test with the previous version of Zope)</FONT>
</P>

<P><FONT SIZE=2>What I will have to do:</FONT>
<BR><FONT SIZE=2>- create a Package (Zope product).</FONT>
<BR><FONT SIZE=2>- create a class in this package, and a method (my_method)</FONT>
<BR><FONT SIZE=2>- create another package.</FONT>
<BR><FONT SIZE=2>- create a class in this package that inherits the class of the other package.</FONT>
</P>

<P><FONT SIZE=2>- check that the method my_method is visible from within the second package.</FONT>
</P>

<P><FONT SIZE=2>Thierry Nabeth</FONT>
<BR><FONT SIZE=2>Research Fellow</FONT>
<BR><FONT SIZE=2>INSEAD CALT (the Centre for Advanced Learning Technologies)</FONT>
<BR><FONT SIZE=2><A HREF="http://www.insead.fr/CALT/" TARGET="_blank">http://www.insead.fr/CALT/</A></FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Dieter Maurer [<A HREF="mailto:dieter@handshake.de">mailto:dieter@handshake.de</A>]</FONT>
<BR><FONT SIZE=2>Sent: Friday, August 18, 2000 9:49 PM</FONT>
<BR><FONT SIZE=2>To: NABETH Thierry</FONT>
<BR><FONT SIZE=2>Cc: 'zope@zope.org'</FONT>
<BR><FONT SIZE=2>Subject: RE: [Zope] Product inhetitance question (similar question)</FONT>
</P>
<BR>

<P><FONT SIZE=2>NABETH Thierry writes:</FONT>
<BR><FONT SIZE=2>&nbsp;&gt; And what happen if the Class A is in a package PA.</FONT>
<BR><FONT SIZE=2>&nbsp;&gt; Clabb B is in a package PB.</FONT>
<BR><FONT SIZE=2>&nbsp;&gt; </FONT>
<BR><FONT SIZE=2>&nbsp;&gt; How do you access the namespace of PA from PB ?</FONT>
<BR><FONT SIZE=2>from PA import A, ..... &lt;whatever you need&gt;</FONT>
</P>

<P><FONT SIZE=2>class B(A): ....</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&gt; When I have tried, the inherited methods from A where not visible</FONT>
<BR><FONT SIZE=2>&nbsp;&gt; from B, and I and to recreate a copie of the method.</FONT>
<BR><FONT SIZE=2>&nbsp;&gt; (which is ugly !!!).</FONT>
<BR><FONT SIZE=2>Almost unbelievable.</FONT>
</P>
<BR>

<P><FONT SIZE=2>Dieter</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C00BA4.FAB3BFC0--