]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Touch up docs for ctypes.FormatError & WinError (GH-127210)
authorJun Komoda <45822440+junkmd@users.noreply.github.com>
Thu, 28 Nov 2024 15:59:47 +0000 (00:59 +0900)
committerGitHub <noreply@github.com>
Thu, 28 Nov 2024 15:59:47 +0000 (16:59 +0100)
Reformat paragraphs, add backquotes, and directives.

Doc/library/ctypes.rst

index f490f7563b58a583d624287cd1600bf6875cbc94..bd9529db9ee65a0bdfd63ca08e87b17367172183 100644 (file)
@@ -2035,9 +2035,9 @@ Utility functions
 
 .. function:: FormatError([code])
 
-   Returns a textual description of the error code *code*.  If no
-   error code is specified, the last error code is used by calling the Windows
-   api function GetLastError.
+   Returns a textual description of the error code *code*.  If no error code is
+   specified, the last error code is used by calling the Windows API function
+   :func:`GetLastError`.
 
    .. availability:: Windows
 
@@ -2142,9 +2142,8 @@ Utility functions
 
 .. function:: WinError(code=None, descr=None)
 
-   This function is probably the worst-named thing in ctypes. It
-   creates an instance of :exc:`OSError`.  If *code* is not specified,
-   ``GetLastError`` is called to determine the error code. If *descr* is not
+   Creates an instance of :exc:`OSError`.  If *code* is not specified,
+   :func:`GetLastError` is called to determine the error code. If *descr* is not
    specified, :func:`FormatError` is called to get a textual description of the
    error.