[Zope3-Users] Interface Use Cases
Tim Cook
timothywayne.cook at gmail.com
Wed Jan 28 07:39:20 EST 2009
All,
I have many places where I have used this in a schema.
class IAbc
attr1 = Object(schema=IAbc)
class Abc(object):
"""does some stuff but is usually an abstract class"""
implements (IAbc)
Where IAbc is actually meant to represent that any one of (let's say)
three different sub-classes of Abc would be acceptable for that
attribute.
I think my approach is completely wrong but I do not understand all the
different cases to use implements, Provides, classImplements, etc.
so if I had:
class Def(Abc):
implements(IDef)
class Gbn(Abc):
implements(IGbn)
class Xds(Abc):
implements(IXds)
What is the correct function to use and where so that when attr1 is
assigned a value it will be happy with an instance of Def, Gbn or Xds?
But nothing else?
Thanks,
--Tim
Then attr1 above would be happy to accept
--
Timothy Cook, MSc
Health Informatics Research & Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
Skype ID == timothy.cook
**************************************************************
*You may get my Public GPG key from popular keyservers or *
*from this link http://timothywayne.cook.googlepages.com/home*
**************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20090128/e3c99985/attachment.bin
More information about the Zope3-users
mailing list