[Zope-CMF] subclassing CMFPlone.MembershipTool

Florent Guillaume fg@nuxeo.com
Fri, 19 Jul 2002 14:25:55 +0000 (UTC)


Karl Anderson  <kra@monkey.org> wrote:
> This is really a Python question, but I'm wondering how the Plone
> people do this.  I'm trying to sublclass Plone's MembershipTool using
> the source below.  It overrides creeateMemberarea(), and currently
> does exactly what Plone's version does.
> 
> When it is called, it gives me an attribute error because
> self.__getPUS() is munged to self._MyMemberhipTool__getPUS(), whether
> I'm subclassing from CMFDefault or CMFPlone.  That's to be expected,
> but how does Plone get away with the same thing?

Simply call explicitely self._MemberhipTool__getPUS().

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com