>>>>> "JRA" == Jay R Ashworth <[EMAIL PROTECTED]> writes:
JRA> Oh. It sounded to *me* like the read-in would fail.
JRA> Misunderstood.
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.
-Barry
_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers
- Re: [Mailman-Developers] Patch: Optionally Suppressing Lis... Jay R. Ashworth
- Re: [Mailman-Developers] Patch: Optionally Suppressin... Barry A. Warsaw
- Re: [Mailman-Developers] Patch: Optionally Suppressin... J C Lawrence
- Re: [Mailman-Developers] Patch: Optionally Suppressing Lis... Jay R. Ashworth
- Re: [Mailman-Developers] Patch: Optionally Suppressin... Barry A. Warsaw
- Re: [Mailman-Developers] Patch: Optionally Suppressing Lis... Jay R. Ashworth
- Re: [Mailman-Developers] Patch: Optionally Suppressin... Barry A. Warsaw
- Re: [Mailman-Developers] Patch: Optionally Suppressing Lis... Jay R. Ashworth
- Re: [Mailman-Developers] Patch: Optionally Suppressin... Barry A. Warsaw
- Re: [Mailman-Developers] Patch: Optionally Suppressing Lis... Jay R. Ashworth
- Re: [Mailman-Developers] Patch: Optionally Suppressin... Barry A. Warsaw
- Re: [Mailman-Developers] Patch: Optionally Suppre... Jay R. Ashworth
