[Python-Dev] Polymorphic best practices [was: (Not) delaying the 3.2 release]

R. David Murray rdmurray at bitdance.com
Fri Sep 17 06:41:49 CEST 2010

On Thu, 16 Sep 2010 23:45:12 -0400, Terry Reedy <tjreedy at udel.edu> wrote:
> Based on the discussion so far, I think you should go ahead and 
> implement the API agreed on by the mail sig both because is *has* been 
> agreed on (and thinking about the wsgi discussion, that seems to be a 
> major achievement) and because it seems sensible to me also, as far as I 
> understand it. The proof of the API will be in the testing. As long as 
> you *think* it covers all intended use cases, I am not sure that 
> abstract discussion can go much further.
> I do have a thought about space and duplication. For normal messages, it 
> is not an issue. For megabyte (or in the future, gigabyte?) attachments, 
> it is. So if possible, there should only be one extracted blob for both 
> bytes and string versions of parsed messages. Or even make the 
> extraction from the raw stream lazy, when specifically requested.

Our intent is to have conversions be as lazy as possible.  There will
doubtless be some interesting heuristics to develop as to what to convert
when and what to cache when, and consequent problems to solve when it
comes to garbage collection...

There's also slated to be a back-end API for storing parts of messages
elsewhere than in memory, though I haven't worked out what that is going
to look like yet.

But we are definitely getting off topic now :)


More information about the Python-Dev mailing list