#14804: Remove [] around optional arguments with default values
Mostly just mechanical removal of []. In some rare cases I've pulled the
default value up into the argument list.
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst
index de12420..ad36b45 100644
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -18,7 +18,7 @@
lots of shared sub-objects. The keys are ordinary strings.
-.. function:: open(filename[, flag='c'[, protocol=None[, writeback=False]]])
+.. function:: open(filename, flag='c', protocol=None, writeback=False)
Open a persistent dictionary. The filename specified is the base filename for
the underlying database. As a side-effect, an extension may be added to the
@@ -100,7 +100,7 @@
implementation used.
-.. class:: Shelf(dict[, protocol=None[, writeback=False]])
+.. class:: Shelf(dict, protocol=None, writeback=False)
A subclass of :class:`UserDict.DictMixin` which stores pickled values in the
*dict* object.
@@ -118,7 +118,7 @@
memory and make sync and close take a long time.
-.. class:: BsdDbShelf(dict[, protocol=None[, writeback=False]])
+.. class:: BsdDbShelf(dict, protocol=None, writeback=False)
A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`,
:meth:`previous`, :meth:`last` and :meth:`set_location` which are available in
@@ -129,7 +129,7 @@
the same interpretation as for the :class:`Shelf` class.
-.. class:: DbfilenameShelf(filename[, flag='c'[, protocol=None[, writeback=False]]])
+.. class:: DbfilenameShelf(filename, flag='c', protocol=None, writeback=False)
A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-like
object. The underlying file will be opened using :func:`anydbm.open`. By