]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER...
authorTomas R <tomas.roun8@gmail.com>
Sun, 20 Aug 2023 10:54:06 +0000 (12:54 +0200)
committerGitHub <noreply@github.com>
Sun, 20 Aug 2023 10:54:06 +0000 (10:54 +0000)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Doc/library/ctypes.rst

index 474359a5cd98bd46ea86c87003c044124de21b94..8af609d53ff4b8886a6eb85fad729a5d5592305f 100644 (file)
@@ -2029,17 +2029,17 @@ Utility functions
    specifying an address, or a ctypes instance.
 
 
-.. function:: POINTER(type)
+.. function:: POINTER(type, /)
 
-   This factory function creates and returns a new ctypes pointer type. Pointer
-   types are cached and reused internally, so calling this function repeatedly is
-   cheap. *type* must be a ctypes type.
+   Create and return a new ctypes pointer type. Pointer types are cached and
+   reused internally, so calling this function repeatedly is cheap.
+   *type* must be a ctypes type.
 
 
-.. function:: pointer(obj)
+.. function:: pointer(obj, /)
 
-   This function creates a new pointer instance, pointing to *obj*. The returned
-   object is of the type ``POINTER(type(obj))``.
+   Create a new pointer instance, pointing to *obj*.
+   The returned object is of the type ``POINTER(type(obj))``.
 
    Note: If you just want to pass a pointer to an object to a foreign function
    call, you should use ``byref(obj)`` which is much faster.