[Mailman-Developers] MemberAdaptor.py [missing line?]

Barry A. Warsaw barry@zope.com
Sun, 27 Jan 2002 21:16:30 -0500


>Then you should either no-op the setMemberPassword() method, or raise
>a RuntimeError.  I sort of doubt that Mailman is prepared to capture
>exceptions in the MemberAdaptor methods, so a no-op might be the most
>expedient thing to do.

    DH> That's what I wasn't sure about...  There's no point raising
    DH> exceptions in MemberAdaptor methods if they aren't caught at a
    DH> later stage...

Agreed.  We definitely don't want exceptions percolating up to the
top.

    DH> Depending on what the LDAP authenticator code throws up, i
    DH> might add some code to the Mailman GUI side, so that the users
    DH> get a nice message when an admin decides that password changes
    DH> aren't permitted via Mailman...

Cool.
    
    DH> On a separate note (and more on python train of thought...) -
    DH> is there a way of working out what types are being returned by
    DH> Python methods??  For example in the OldStyleMemberships
    DH> class, you return different structures for some methods... eg
    DH> getRegularMemberKeys() returns a marshal (I think)

Not in plain Python, there really isn't.  However, Zope defines and
uses something called an Interface type which is likely how
MemberAdaptor and friends should refer to.  Interfaces can define the
signatures of methods, although implementations aren't forced to
adhere to them.  Python ain't C++. :)

I don't think I'll use Interfaces until I can require Python 2.2 or
better.  I believe (but am not 100% sure) that Zope's Interfaces are
implemented as ExtensionClass types, and that's too big a hurdle for
Mailman.

-Barry