Hello Hermann,

Tuesday, February 19, 2008, 4:46:29 PM, you wrote:

HH> Hi,
HH> I'm over and over confronted with a simple pattern, where I need to clone
HH> interface field. For instance, I have the content object, which has an
HH> interface, e.g.:

HH> class IPersonSearch(Interface):
HH>   name = copy.deepcopy(IPerson['name'])

Might not be the nicest solution, but works here.

You can do some magic too:

from zope.interface.interface import InterfaceClass
newIF = InterfaceClass(name=newname, __module__ = module,

Where newfields is a dict with keys of name and values of fields

Best regards,
 Adam Groszer                            mailto:[EMAIL PROTECTED]
Quote of the day:
You can easily judge the character of a man by how he treats those who can do 
nothing for him. 
- James D. Miles 

Zope3-users mailing list

Reply via email to