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

Re: [Zope-dev] Extension class and __init__

2002-07-22 Thread Chris McDonough
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: