This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Email.message example missing arg
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, terry.reedy
Priority: normal Keywords:

Created on 2003-10-03 13:54 by terry.reedy, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Messages (2)
msg18531 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2003-10-03 13:54
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.

msg18532 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-10-31 19:53
Logged In: YES 
user_id=11375

Well spotted!  I've fixed this on both the CVS trunk and the 2.3 maintenance 
branch.
History
Date User Action Args
2022-04-10 16:11:35adminsetgithub: 39361
2003-10-03 13:54:51terry.reedycreate