From a22ae21db6a7e9f1833c73dc91fb621b86be6146 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 20 Mar 2014 09:42:01 -0500 Subject: [PATCH 1/4] Fix parameter name in docs for os.makedirs and os.removedirs. Pointed out by Colin Davis on docs@. --- Doc/library/os.rst | 4 ++-- Lib/os.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index f50e5d97f49..8e19c25b79c 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1607,7 +1607,7 @@ features: The *dir_fd* argument. -.. function:: makedirs(path, mode=0o777, exist_ok=False) +.. function:: makedirs(name, mode=0o777, exist_ok=False) .. index:: single: directory; creating @@ -1763,7 +1763,7 @@ features: The *dir_fd* argument. -.. function:: removedirs(path) +.. function:: removedirs(name) .. index:: single: directory; deleting diff --git a/Lib/os.py b/Lib/os.py index e9880a1e4c7..fa0fbb9b3e5 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -216,7 +216,7 @@ def _get_masked_mode(mode): # (Inspired by Eric Raymond; the doc strings are mostly his) def makedirs(name, mode=0o777, exist_ok=False): - """makedirs(path [, mode=0o777][, exist_ok=False]) + """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not @@ -260,7 +260,7 @@ def makedirs(name, mode=0o777, exist_ok=False): raise def removedirs(name): - """removedirs(path) + """removedirs(name) Super-rmdir; remove a leaf directory and all empty intermediate ones. Works like rmdir except that, if the leaf directory is From 253deed8620d910420d35d28f669d4481dcd2a58 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 20 Mar 2014 09:46:09 -0500 Subject: [PATCH 2/4] Add missing parenthesis. Found by cocoatomo on docs@. --- Doc/distutils/apiref.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index 36a911ebbd9..e1357fa90de 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -993,7 +993,7 @@ directories. Files in *src* that begin with :file:`.nfs` are skipped (more information on these files is available in answer D2 of the `NFS FAQ page - `_. + `_). .. versionchanged:: 3.3.1 NFS files are ignored. From dbd1c43e524b63107fa2149a2664ac73287111e7 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 20 Mar 2014 10:01:48 -0500 Subject: [PATCH 3/4] Fix spelling in enum docs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "equivalant" was caught by Tobias Käs on docs@, "seperated" and "chartruese" were discovered by a spell-checker. --- Doc/library/enum.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index fc7267bf73c..acdcf7f8bc9 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -442,7 +442,7 @@ The complete signature is:: :value: What the new Enum class will record as its name. -:names: The Enum members. This can be a whitespace or comma seperated string +:names: The Enum members. This can be a whitespace or comma separated string (values will start at 1):: 'red green blue' | 'red,green,blue' | 'red, green, blue' @@ -453,7 +453,7 @@ The complete signature is:: or a mapping:: - {'chartruese': 7, 'sea_green': 11, 'rosemary': 42} + {'chartreuse': 7, 'sea_green': 11, 'rosemary': 42} :module: name of module where new Enum class can be found. @@ -543,7 +543,7 @@ Some rules: add methods and don't specify another data type such as :class:`int` or :class:`str`. 3. When another data type is mixed in, the :attr:`value` attribute is *not the - same* as the enum member itself, although it is equivalant and will compare + same* as the enum member itself, although it is equivalent and will compare equal. 4. %-style formatting: `%s` and `%r` call :class:`Enum`'s :meth:`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or `%h` for From 2f31b4b57762154314beec3b91b4d4a600e17e61 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 20 Mar 2014 10:16:09 -0500 Subject: [PATCH 4/4] Fix typos in Doc/faq/extending. Found by cocoatomo on docs@. --- Doc/faq/extending.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/faq/extending.rst b/Doc/faq/extending.rst index a9a234b1eca..d196e861766 100644 --- a/Doc/faq/extending.rst +++ b/Doc/faq/extending.rst @@ -95,8 +95,8 @@ To test the type of an object, first make sure it isn't *NULL*, and then use There is also a high-level API to Python objects which is provided by the so-called 'abstract' interface -- read ``Include/abstract.h`` for further details. It allows interfacing with any kind of Python sequence using calls -like :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc.) as well -as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et. +like :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc. as well +as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et al.) and mappings in the PyMapping APIs.