A
Adrien Di Mascio
Hi all,
While reading the email module documentation, I found an error in a
small example given for the as_string() method of the Message class:
Here is the given code :
(URL : http://python.org/doc/current/lib/module-email.Message.html)
from cStringIO import StringIO
from email.Generator import Generator
fp = StringIO()
g = Generator(mangle_from_=False, maxheaderlen=60)
g.flatten(msg)
text = fp.getvalue()
The Generator constructor should take the StingIO instance as first
argument, am I wrong ?
Although this is only a small mistake, I think it should always
be fixed.
If I've missed something or if this error have already been reported,
just forget my mail.
Cheers,
While reading the email module documentation, I found an error in a
small example given for the as_string() method of the Message class:
Here is the given code :
(URL : http://python.org/doc/current/lib/module-email.Message.html)
from cStringIO import StringIO
from email.Generator import Generator
fp = StringIO()
g = Generator(mangle_from_=False, maxheaderlen=60)
g.flatten(msg)
text = fp.getvalue()
The Generator constructor should take the StingIO instance as first
argument, am I wrong ?
Although this is only a small mistake, I think it should always
be fixed.
If I've missed something or if this error have already been reported,
just forget my mail.
Cheers,