mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-116851: Remove "from ctypes import *" from a ctypes example (GH-116852) (GH-116905)
It is confusing, because libc is not imported from ctypes,
but defined in previous examples, which already contain the import.
(cherry picked from commit 744c077795
)
Co-authored-by: jnchen <caojingchen@live.com>
This commit is contained in:
parent
04e6146634
commit
216b022922
1 changed files with 0 additions and 1 deletions
|
@ -93,7 +93,6 @@ Accessing functions from loaded dlls
|
||||||
|
|
||||||
Functions are accessed as attributes of dll objects::
|
Functions are accessed as attributes of dll objects::
|
||||||
|
|
||||||
>>> from ctypes import *
|
|
||||||
>>> libc.printf
|
>>> libc.printf
|
||||||
<_FuncPtr object at 0x...>
|
<_FuncPtr object at 0x...>
|
||||||
>>> print(windll.kernel32.GetModuleHandleA) # doctest: +WINDOWS
|
>>> print(windll.kernel32.GetModuleHandleA) # doctest: +WINDOWS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue