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
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
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
Ross,
Please see the bit about inheritedAttribute in the document inside
Zope's source tree named
lib/Components/ExtensionClass/doc/ExtensionClass.html.
HTH,
- C
- Original Message -
From: Ross Boylan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Ross Boylan [EMAIL PROTECTED]
Sent: