[Spambayes] Corpus.Message.__getattr__ can't be correct can it?

Skip Montanaro skip at pobox.com
Fri Jan 17 14:06:52 EST 2003

    Richie> It should probably be:

    Richie>     return self.__dict__[attributeName]

    Richie> so that it raises an exception when something goes wrong.  This
    Richie> is probably related to
    Richie> https://sourceforge.net/tracker/?func=detail&atid=498103&aid=651365&group_id=61702

Yes, now that I know what's going on, I understand why I was getting
infinite loops.  The __getattr__ method is really only meant to initialize
payload and hdrtxt.  Any other attributes should raise AttributeError.  I
corrected the code in Corpus.py and closed out the bug report.


More information about the Spambayes mailing list