On Sun, 2005-09-18 at 17:34, Tokio Kikuchi wrote:
> I think we can write more intuitive and robust code like this:
>
> if mlist.max_message_size > 0:
> bodylen = len(msg.as_string().split('\n\n',1)[1])The only problem with that is that it's not very efficient to turn the message back into a flattened string in order to calculate its size. Here's an idea: Python's FeedParser (or a subclass of that in Mailman) should keep a running count of the size of data fed to it, and it should add that to the message as an attribute. Even cooler would be if each subpart could have an accurate .size attribute added to it as it was being parsed. Anybody care to work up a patch for that? -Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Mailman-Developers mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
