]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852)
authorjnchen <caojingchen@live.com>
Sat, 16 Mar 2024 13:01:45 +0000 (21:01 +0800)
committerGitHub <noreply@github.com>
Sat, 16 Mar 2024 13:01:45 +0000 (15:01 +0200)
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.

Doc/library/ctypes.rst

index eed18201e3ede0575a96e9483859ce7ec9408d25..36976470b5a46885c1c0e9e7c81b77b8c9b05049 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