Use new optional argument style in email docs.
diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst
index ec2e71b..3de5c31 100644
--- a/Doc/library/email.parser.rst
+++ b/Doc/library/email.parser.rst
@@ -58,13 +58,12 @@
Here is the API for the :class:`FeedParser`:
-.. class:: FeedParser([_factory])
+.. class:: FeedParser(_factory=email.message.Message)
Create a :class:`FeedParser` instance. Optional *_factory* is a no-argument
callable that will be called whenever a new message object is needed. It
defaults to the :class:`email.message.Message` class.
-
.. method:: feed(data)
Feed the :class:`FeedParser` some more data. *data* should be a string
@@ -74,7 +73,6 @@
carriage return, newline, or carriage return and newline (they can even be
mixed).
-
.. method:: close()
Closing a :class:`FeedParser` completes the parsing of all previously fed
@@ -96,7 +94,7 @@
class.
-.. class:: Parser([_class])
+.. class:: Parser(_class=email.message.Message, strict=None)
The constructor for the :class:`Parser` class takes an optional argument
*_class*. This must be a callable factory (such as a function or a class), and
@@ -115,7 +113,7 @@
The other public :class:`Parser` methods are:
- .. method:: parse(fp[, headersonly])
+ .. method:: parse(fp, headersonly=False)
Read all the data from the file-like object *fp*, parse the resulting
text, and return the root message object. *fp* must support both the
@@ -129,7 +127,7 @@
Optional *headersonly* is as with the :meth:`parse` method.
- .. method:: parsestr(text[, headersonly])
+ .. method:: parsestr(text, headersonly=False)
Similar to the :meth:`parse` method, except it takes a string object
instead of a file-like object. Calling this method on a string is exactly
@@ -147,14 +145,14 @@
.. currentmodule:: email
-.. function:: message_from_string(s[, _class[, strict]])
+.. function:: message_from_string(s[, _class][, strict])
Return a message object structure from a string. This is exactly equivalent to
``Parser().parsestr(s)``. Optional *_class* and *strict* are interpreted as
with the :class:`Parser` class constructor.
-.. function:: message_from_file(fp[, _class[, strict]])
+.. function:: message_from_file(fp[, _class][, strict])
Return a message object structure tree from an open file object. This is
exactly equivalent to ``Parser().parse(fp)``. Optional *_class* and *strict*