Re: [Zope-dev] Extension class and __init__

2002-07-28 Thread Dieter Maurer
Ross Boylan writes: The example there is basically class Spam: def __init__(self): ... class ECSpam(Base, Spam): #Base is an ExtensionClass def __init__(self): ECSpam.inheritedAttribute('__init__')(self) I started to use the following idiom: class

Re: [Zope-dev] Extension class and __init__

2002-07-27 Thread Lennart Regebro
From: Adrian Hungate [EMAIL PROTECTED] Erm... that trashes the concept of mixin's, doesn't it? No, why would it? Just make your mixins inherit Extentionclass.base! If you have third-party mixins that aren't made for Zope from the beginning and need initailization, then you probably have to

Re: [Zope-dev] Extension class and __init__

2002-07-27 Thread Chris Withers
Ross Boylan wrote: class ECSpam(Base, Spam): #Base is an ExtensionClass def __init__(self): ECSpam.inheritedAttribute('__init__')(self) What if you have more than one base class with the method defined? The normal Python inheritted attribute lookup rules: depth first, left to

[Zope-dev] Extension class and __init__

2002-07-22 Thread Ross Boylan
I had the bright idea of defining a mixin class whose methods I thought I could use in my regular Zope product classes: class AMixin: def __init__(self): blah, blah blah class B(AMixin, Persistent, Folder, ): def __init__(self): # do some of my own stuff

Re: [Zope-dev] Extension class and __init__

2002-07-22 Thread Chris McDonough
: Monday, July 22, 2002 3:30 AM Subject: [Zope-dev] Extension class and __init__ I had the bright idea of defining a mixin class whose methods I thought I could use in my regular Zope product classes: class AMixin: def __init__(self): blah, blah blah class B(AMixin, Persistent, Folder