Skip to content

Commit 482c5f7

Browse files
committed
as_string(): Added some text to the docstring to make it clear that
it's a convenience only and give hints on what to do for more flexibility.
1 parent b05df57 commit 482c5f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/email/Message.py

+4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def as_string(self, unixfrom=False):
102102
"""Return the entire formatted message as a string.
103103
Optional `unixfrom' when True, means include the Unix From_ envelope
104104
header.
105+
106+
This is a convenience method and may not generate the message exactly
107+
as you intend. For more flexibility, use the flatten() method of a
108+
Generator instance.
105109
"""
106110
from email.Generator import Generator
107111
fp = StringIO()

0 commit comments

Comments
 (0)