[Zope3-dev] Re: Interface support in Python? (was Re: [Zope3-dev]
Proposal: Improving on __implements__)
Chris Withers
chrisw@nipltd.com
Thu, 23 Jan 2003 10:42:47 +0000
Steve Alexander wrote:
>
> getattr(instance, 'foo')
> gets me the foo of the instance
> or if there is none, the foo of the class
> or if there is none, the foo of the metaclass,
> or if there is none, the foo of the meta-metaclass,
> or if there is none, a KeyError
>
> getattr(cls, 'foo')
> gets me the foo of the class
> or if there is none, the foo of the metaclass,
> or if there is none, the foo of the meta-metaclass,
> or if there is none, a KeyError
>
> getattr(metacls, 'foo')
> gets me the foo of the metaclass,
> or if there is none, the foo of the meta-metaclass,
> or if there is none, a KeyError
>
> getattr(metacls, 'foo')
> gets me the foo of the meta-metaclass,
> or if there is none, a KeyError
Surely you mean AttributeError here?
cheers,
Chris