Re: I miss size() (and some latest frustration)
"R. David Murray" <[email protected]> Fri, 25 Mar 2011 17:25:20 -0400
| Newsgroups | gmane.comp.python.mime.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 25 Mar 2011 16:10:03 -0400, Barry Warsaw <[email protected]> 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