Skip to content

Commit 49fee59

Browse files
authored
Touch up docs for ctypes.FormatError & WinError (GH-127210)
Reformat paragraphs, add backquotes, and directives.
1 parent db5c576 commit 49fee59

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Doc/library/ctypes.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,9 +2035,9 @@ Utility functions
20352035

20362036
.. function:: FormatError([code])
20372037

2038-
Returns a textual description of the error code *code*. If no
2039-
error code is specified, the last error code is used by calling the Windows
2040-
api function GetLastError.
2038+
Returns a textual description of the error code *code*. If no error code is
2039+
specified, the last error code is used by calling the Windows API function
2040+
:func:`GetLastError`.
20412041

20422042
.. availability:: Windows
20432043

@@ -2142,9 +2142,8 @@ Utility functions
21422142

21432143
.. function:: WinError(code=None, descr=None)
21442144

2145-
This function is probably the worst-named thing in ctypes. It
2146-
creates an instance of :exc:`OSError`. If *code* is not specified,
2147-
``GetLastError`` is called to determine the error code. If *descr* is not
2145+
Creates an instance of :exc:`OSError`. If *code* is not specified,
2146+
:func:`GetLastError` is called to determine the error code. If *descr* is not
21482147
specified, :func:`FormatError` is called to get a textual description of the
21492148
error.
21502149

0 commit comments

Comments
 (0)