]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 20 Aug 2023 11:05:24 +0000 (04:05 -0700)
committerGitHub <noreply@github.com>
Sun, 20 Aug 2023 11:05:24 +0000 (11:05 +0000)
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (GH-107769)
(cherry picked from commit beffb30dc7a07044f4198245d049ddda1f4b24db)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
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 debc1c0adde84102b991b91c6120a029977f7c3e..e2dde683a1a5d384475d6ca271b78e4e93e4a336 100644 (file)
@@ -1988,17 +1988,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.