R: [Zope] acquisition or inheritance?
I think inheritance is a "genetic" concept, an object inherits an attribute and has it forever, where acquisition depends on the container the object has, and then on his context. There are several how-tos about acquisition where you can find better explanations, see also http://webdev.zopeonarope.com/ and http://www.byte.com/documents/s=705/byt20010614s0001/ Michele
-----Messaggio originale----- Da: Bill Kerr [mailto:kerrb@senet.com.au] Inviato: giovedì 2 maggio 2002 21.16 A: zope@zope.org Oggetto: [Zope] acquisition or inheritance?
why does the zope literature use the term acquisition and not inheritance? - Bill
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Fri, May 03, 2002 at 10:37:24AM +0200, Zanotti Michele wrote:
I think inheritance is a "genetic" concept, an object inherits an attribute and has it forever, where acquisition depends on the container the object has, and then on his context. There are several how-tos about acquisition where you can find better explanations, see also http://webdev.zopeonarope.com/ and http://www.byte.com/documents/s=705/byt20010614s0001/
The way I think of it is this: Inheritance is fixed when an object is instantiated. It can never change during the object's lifetime.* Acquisition is completely dynamic. Move an object to a different container (folder) at any time, and you're suddenly acquiring different things. * well, that's true in most programming languages... in python, nearly anything can be changed at any time so I wouldn't be surprised if there's a sneaky way to change an object's superclasses at run time. -- "Welcome to Muppet Labs, where the future is made - today!"
participants (2)
-
Paul Winkler -
Zanotti Michele