[Python-3000] Question about email/generator.py

Luke Stebbing luke.stebbing at gmail.com
Tue Oct 23 23:31:01 CEST 2007


On 10/23/07, Barry Warsaw <barry at python.org> wrote:
> On Oct 23, 2007, at 3:36 PM, Guido van Rossum wrote:
> > At this point I (Guido) am really hoping someone will want to "own"
> > this issue and redesign the API properly...
>
> I'm really bummed that I've had no time to work on this.  Life and
> work have imposed.  I'd be willing to chat with someone about what I
> think should happen.  At this point irc or im might be best. :(

In py2k, you determine whether a payload is 'list of Message' or 'str'
by calling .is_multipart(). Maybe .is_str() and .is_bytes() methods
(or properties) could be added. Alternatively, there could be a
.payload_type property to test against.

Whatever it does, I think it should parallel the polymorphic structure
used by the new I/O [1]. Does that mean Message ABCs? Would that be
overkill?

I've been using the email package pretty heavily this year, and I'd be
up for talking about this on any of the im services or on freenode or
whatever.

Luke

[1] http://www.python.org/dev/peps/pep-3116


More information about the Python-3000 mailing list