[Python-bugs-list] [ python-Bugs-817178 ] Email.message example missing arg

SourceForge.net noreply at sourceforge.net
Fri Oct 3 09:54:51 EDT 2003


Bugs item #817178, was opened at 2003-10-03 09:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=817178&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Terry J. Reedy (tjreedy)
Assigned to: Nobody/Anonymous (nobody)
Summary: Email.message example missing arg

Initial Comment:
LIb Ref 12.2.3 Generating MIME documents says

 '''

class Generator( outfp[, mangle_from_[, 

maxheaderlen]]) 



The constructor for the Generator class takes a file-like 

object called outfp for an argument. outfp must support 

the write() method and be usable as the output file in a 

Python extended print statement. 

'''



12.2.1 Representing an email message has example

 '''

from cStringIO import StringIO

from email.Generator import Generator

fp = StringIO()

g = Generator(mangle_from_=False, maxheaderlen=60)

...

'''

It seems prett clear that fp should be added as first arg 

of Generator call.





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=817178&group_id=5470



More information about the Python-bugs-list mailing list