[Zope] Zope and Polymorphism

Steve Spicklemire steve@spvi.com
Wed, 9 Feb 2000 10:51:46 -0500 (EST)


Hi Jay,

Well.. if you have a bunch of ZClasses with the same 
behavior, say they can all do the cha-cha, you could just 
give them a property (canDoTheChaCha) and check for
that. Then they don't need to subclass from anything
in particular, so long as they conform to any cha-cha like
behavior expectations. ;-)

-steve

>>>>> "Jay," == Jay, Dylan <djay@lucent.com> writes:

    Jay,> Thats really ugly having to know the distingishing method
    Jay,> names.  Isn't there some method like
    Jay,> _.inheritsfrom(_['sequence-item'],'Folder')

    Jay,> ???

    >> -----Original Message----- From: Steve Spicklemire
    >> [mailto:steve@spvi.com] Sent: Tuesday, February 08, 2000 11:07
    >> PM To: ingo.assenmacher@post.rwth-aachen.de Cc: zope@zope.org
    >> Subject: Re: [Zope] Zope and Polymorphism
    >> 
    >> 
    >> 
    >> Hi Ingo,
    >> 
    >> How about something like.... :
    >> 
    >> <dtml-in objectValues> <dtml-if
    >> "_.hasattr(_['sequence-item'],'isAnObjectManager')">
    >> 
    >> blah blah blah...
    >> 
    >> </dtml-if> </dtml-in>
    >> 
    >> -steve
    >>