diff options
author | Tomas R <tomas.roun8@gmail.com> | 2023-08-20 10:54:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-20 10:54:06 (GMT) |
commit | beffb30dc7a07044f4198245d049ddda1f4b24db (patch) | |
tree | 64af95c0f13c557d27def08efb8ec34a4d01f09b /Doc/library | |
parent | 1a713eac47b26899044752f02cbfcb4d628dda2a (diff) | |
download | cpython-beffb30dc7a07044f4198245d049ddda1f4b24db.zip cpython-beffb30dc7a07044f4198245d049ddda1f4b24db.tar.gz cpython-beffb30dc7a07044f4198245d049ddda1f4b24db.tar.bz2 |
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (#107769)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/ctypes.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 474359a..8af609d 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -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. |