@@ -36,7 +36,7 @@ Here are the methods of the :class:`Message` class:
3636 The constructor takes no arguments.
3737
3838
39- .. method :: as_string([ unixfrom] )
39+ .. method :: as_string(unixfrom=False, maxheaderlen=0 )
4040
4141 Return the entire message flattened as a string. When optional *unixfrom *
4242 is ``True ``, the envelope header is included in the returned string.
@@ -88,7 +88,7 @@ Here are the methods of the :class:`Message` class:
8888 :meth: `set_payload ` instead.
8989
9090
91- .. method :: get_payload([i[ , decode]] )
91+ .. method :: get_payload(i=None , decode=False )
9292
9393 Return the current payload, which will be a list of
9494 :class: `Message ` objects when :meth: `is_multipart ` is ``True ``, or a
@@ -113,7 +113,7 @@ Here are the methods of the :class:`Message` class:
113113 *decode * is ``False ``.
114114
115115
116- .. method :: set_payload(payload[ , charset] )
116+ .. method :: set_payload(payload, charset=None )
117117
118118 Set the entire message object's payload to *payload *. It is the client's
119119 responsibility to ensure the payload invariants. Optional *charset * sets
@@ -201,7 +201,8 @@ Here are the methods of the :class:`Message` class:
201201 .. method :: __delitem__(name)
202202
203203 Delete all occurrences of the field with name *name * from the message's
204- headers. No exception is raised if the named field isn't present in the headers.
204+ headers. No exception is raised if the named field isn't present in the
205+ headers.
205206
206207
207208 .. method :: Message.__contains__(name)
@@ -226,7 +227,7 @@ Here are the methods of the :class:`Message` class:
226227 values.
227228
228229
229- .. method :: get(name[ , failobj] )
230+ .. method :: get(name, failobj=None )
230231
231232 Return the value of the named header field. This is identical to
232233 :meth: `__getitem__ ` except that optional *failobj * is returned if the
@@ -235,7 +236,7 @@ Here are the methods of the :class:`Message` class:
235236 Here are some additional useful methods:
236237
237238
238- .. method :: get_all(name[ , failobj] )
239+ .. method :: get_all(name, failobj=None )
239240
240241 Return a list of all the values for the field named *name *. If there are
241242 no such named headers in the message, *failobj * is returned (defaults to
@@ -315,7 +316,7 @@ Here are the methods of the :class:`Message` class:
315316 :mailheader: `Content-Type ` header.
316317
317318
318- .. method :: get_params([ failobj[ , header[ , unquote]]] )
319+ .. method :: get_params(failobj=None , header='content-type' , unquote=True )
319320
320321 Return the message's :mailheader: `Content-Type ` parameters, as a list.
321322 The elements of the returned list are 2-tuples of key/value pairs, as
@@ -330,7 +331,7 @@ Here are the methods of the :class:`Message` class:
330331 search instead of :mailheader: `Content-Type `.
331332
332333
333- .. method :: get_param(param[ , failobj[ , header[ , unquote]]] )
334+ .. method :: get_param(param, failobj=None , header='content-type' , unquote=True )
334335
335336 Return the value of the :mailheader: `Content-Type ` header's parameter
336337 *param * as a string. If the message has no :mailheader: `Content-Type `
@@ -363,7 +364,7 @@ Here are the methods of the :class:`Message` class:
363364 to ``False ``.
364365
365366
366- .. method :: set_param(param, value[ , header[ , requote[ , charset[ , language]]]] )
367+ .. method :: set_param(param, value, header='Content-Type' , requote=True , charset=None , language='' )
367368
368369 Set a parameter in the :mailheader: `Content-Type ` header. If the
369370 parameter already exists in the header, its value will be replaced with
@@ -381,7 +382,7 @@ Here are the methods of the :class:`Message` class:
381382 should be strings.
382383
383384
384- .. method :: del_param(param[ , header[ , requote]] )
385+ .. method :: del_param(param, header='content-type' , requote=True )
385386
386387 Remove the given parameter completely from the :mailheader: `Content-Type `
387388 header. The header will be re-written in place without the parameter or
@@ -390,7 +391,7 @@ Here are the methods of the :class:`Message` class:
390391 alternative to :mailheader: `Content-Type `.
391392
392393
393- .. method :: set_type(type[ , header][ , requote] )
394+ .. method :: set_type(type, header='Content-Type' , requote=True )
394395
395396 Set the main type and subtype for the :mailheader: `Content-Type `
396397 header. *type * must be a string in the form :mimetype: `maintype/subtype `,
@@ -406,7 +407,7 @@ Here are the methods of the :class:`Message` class:
406407 header is also added.
407408
408409
409- .. method :: get_filename([ failobj] )
410+ .. method :: get_filename(failobj=None )
410411
411412 Return the value of the ``filename `` parameter of the
412413 :mailheader: `Content-Disposition ` header of the message. If the header
@@ -416,7 +417,7 @@ Here are the methods of the :class:`Message` class:
416417 unquoted as per :func: `email.utils.unquote `.
417418
418419
419- .. method :: get_boundary([ failobj] )
420+ .. method :: get_boundary(failobj=None )
420421
421422 Return the value of the ``boundary `` parameter of the
422423 :mailheader: `Content-Type ` header of the message, or *failobj * if either
@@ -439,7 +440,7 @@ Here are the methods of the :class:`Message` class:
439440 have been present in the original :mailheader: `Content-Type ` header.
440441
441442
442- .. method :: get_content_charset([ failobj] )
443+ .. method :: get_content_charset(failobj=None )
443444
444445 Return the ``charset `` parameter of the :mailheader: `Content-Type ` header,
445446 coerced to lower case. If there is no :mailheader: `Content-Type ` header, or if
@@ -449,7 +450,7 @@ Here are the methods of the :class:`Message` class:
449450 :class: `~email.charset.Charset ` instance for the default encoding of the message body.
450451
451452
452- .. method :: get_charsets([ failobj] )
453+ .. method :: get_charsets(failobj=None )
453454
454455 Return a list containing the character set names in the message. If the
455456 message is a :mimetype: `multipart `, then the list will contain one element
0 commit comments