From: Berker Peksag Date: Mon, 11 Apr 2016 09:23:04 +0000 (+0300) Subject: Fix typos in mock and exceptions docs X-Git-Tag: v3.6.0a1~233^2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fafc74d45d2f6eba034ca0ff450adf12610ff18;p=python Fix typos in mock and exceptions docs The default value of __len__ is 0, not 1: >>> from unittest.mock import MagicMock >>> mock = MagicMock() >>> len(mock) 0 Reported by Alex on docs@p.o. Remove the remaining VMSError reference. VMS support is gone. --- diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index ba6122e29b..5a7193393c 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -288,7 +288,7 @@ The following exceptions are the exceptions that are usually raised. .. versionchanged:: 3.3 :exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, - :exc:`VMSError`, :exc:`socket.error`, :exc:`select.error` and + :exc:`socket.error`, :exc:`select.error` and :exc:`mmap.error` have been merged into :exc:`OSError`, and the constructor may return a subclass. diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 9a51194b8a..929ceadbd7 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1697,7 +1697,7 @@ Methods and their defaults: * ``__ge__``: NotImplemented * ``__int__``: 1 * ``__contains__``: False -* ``__len__``: 1 +* ``__len__``: 0 * ``__iter__``: iter([]) * ``__exit__``: False * ``__complex__``: 1j