diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/ctypes.rst | 11 | ||||
-rw-r--r-- | Doc/library/pkgutil.rst | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 4da276c4aa..1d45a37f11 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1100,14 +1100,15 @@ access violation or whatever, so it's better to break out of the loop when we hit the NULL entry:: >>> for item in table: - ... print(item.name, item.size) ... if item.name is None: ... break + ... print(item.name.decode("ascii"), item.size) ... - __hello__ 104 - __phello__ -104 - __phello__.spam 104 - None 0 + _frozen_importlib 31764 + _frozen_importlib_external 41499 + __hello__ 161 + __phello__ -161 + __phello__.spam 161 >>> The fact that standard Python has a frozen module and a frozen package diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst index 5d3295db7e..26c5ac066b 100644 --- a/Doc/library/pkgutil.rst +++ b/Doc/library/pkgutil.rst @@ -140,7 +140,7 @@ support. .. function:: iter_modules(path=None, prefix='') Yields ``(module_finder, name, ispkg)`` for all submodules on *path*, or, if - path is ``None``, all top-level modules on ``sys.path``. + *path* is ``None``, all top-level modules on ``sys.path``. *path* should be either ``None`` or a list of paths to look for modules in. @@ -161,7 +161,7 @@ support. .. function:: walk_packages(path=None, prefix='', onerror=None) Yields ``(module_finder, name, ispkg)`` for all modules recursively on - *path*, or, if path is ``None``, all accessible modules. + *path*, or, if *path* is ``None``, all accessible modules. *path* should be either ``None`` or a list of paths to look for modules in. |