On Fri, 25 Mar 2011 16:10:03 -0400, Barry Warsaw <ba...@python.org> wrote: > >For message parsing, it seems like allowing registered callbacks for various > >pieces would be handy... "Call me when you parse this type of a header" (or > >body part, etc.). > > I think David's design documents to allow for extensions and callbacks based > on the content-types of things seen.
Effectively, yes. The idea is that there is a factory that gets called whenever a mime content type or a header is instantiated, so that factory can do whatever magic it would like. The standard factories will have a lookup table for the factories for individual types, so you can alternately use a copy of the standard factory with just the headers or mime types you are interested in hooked. We'll want to refine the design when I get near to actually implementing it. -- R. David Murray http://www.bitdance.com _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com