]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 16 Mar 2024 13:10:10 +0000 (14:10 +0100)
committerGitHub <noreply@github.com>
Sat, 16 Mar 2024 13:10:10 +0000 (13:10 +0000)
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
(cherry picked from commit 744c0777952f1e535d1192ee15b286aa67b61533)

Co-authored-by: jnchen <caojingchen@live.com>
Doc/library/ctypes.rst

index 2d6f61930cbe86b8b59550539618c79185a88cd9..948249783579c198522e30e5d4294a56be63698a 100644 (file)
@@ -93,7 +93,6 @@ Accessing functions from loaded dlls
 
 Functions are accessed as attributes of dll objects::
 
-   >>> from ctypes import *
    >>> libc.printf
    <_FuncPtr object at 0x...>
    >>> print(windll.kernel32.GetModuleHandleA)  # doctest: +WINDOWS