[Mailman-Developers] Patch: Optionally Suppressing List Headers

Jay R. Ashworth jra@baylink.com
Thu, 5 Apr 2001 13:23:24 -0400


On Thu, Apr 05, 2001 at 01:23:16PM -0400, Barry A. Warsaw wrote:
>     JRA> Then what's the problem?
> 
> The read succeeds but the resulting MailList instance won't have the
> new attribute.  When the module tries to access that attribute, you'll
> get an AttributeError.  This /could/ be worked around by using
> something like:
> 
>     if getattr(mlist, 'my_new_attribute', 0):
> 
> instead of
> 
>     if mlist.my_new_attribute:
> 
> The getattr() approach doesn't raise an exception when given a default
> value.

Ah.

The problem is that the wrapper isn't first-class.  (That is, it fails
to behave in a sufficiently transparent fashion to keep you from being
able to tell that it's not just "storing the object on disk". (did the
explanation make matters worse? :-)))

Got it.

FYI, I consider that a design deficiency (which is a slightly different
category from a 'bug' :-), and I concur that it *should* be fixed; does
the approach you mention have other unforseen difficulties that it
imposes?

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra@baylink.com
Member of the Technical Staff     Baylink
The Suncoast Freenet         The Things I Think
Tampa Bay, Florida        http://baylink.pitas.com             +1 727 804 5015