summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorJun Komoda <45822440+junkmd@users.noreply.github.com>2024-11-28 15:59:47 (GMT)
committerGitHub <noreply@github.com>2024-11-28 15:59:47 (GMT)
commit49fee592a4fad17781bb4a78f95085d6edbb24d5 (patch)
tree82e151b4e27a281cc31fc75d123b9b1268faecee /Doc/library
parentdb5c5763f3e3172f1dd011355b41469770dafc0f (diff)
downloadcpython-49fee592a4fad17781bb4a78f95085d6edbb24d5.zip
cpython-49fee592a4fad17781bb4a78f95085d6edbb24d5.tar.gz
cpython-49fee592a4fad17781bb4a78f95085d6edbb24d5.tar.bz2
Touch up docs for ctypes.FormatError & WinError (GH-127210)
Reformat paragraphs, add backquotes, and directives.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/ctypes.rst11
1 files changed, 5 insertions, 6 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index f490f75..bd9529d 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -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.