Skip to content

Commit 9d8125f

Browse files
committed
Use double quotes for string values in documentation
Change from single quotes to double quotes when describing string values like "ignore", "warn", and "fail" in docstrings and documentation for consistency.
1 parent bad9691 commit 9d8125f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Doc/library/multiprocessing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,9 +1222,9 @@ Miscellaneous
12221222
launched (before creating a :class:`Pool` or starting a :class:`Process`).
12231223

12241224
The *on_error* parameter controls how :exc:`ImportError` exceptions during
1225-
module preloading are handled: ``'ignore'`` (default) silently ignores
1226-
failures, ``'warn'`` causes the forkserver subprocess to emit an
1227-
:exc:`ImportWarning` to stderr, and ``'fail'`` causes the forkserver
1225+
module preloading are handled: ``"ignore"`` (default) silently ignores
1226+
failures, ``"warn"`` causes the forkserver subprocess to emit an
1227+
:exc:`ImportWarning` to stderr, and ``"fail"`` causes the forkserver
12281228
subprocess to exit with the exception traceback on stderr, making
12291229
subsequent process creation fail with :exc:`EOFError` or
12301230
:exc:`ConnectionError`.

Lib/multiprocessing/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ def set_forkserver_preload(self, module_names, *, on_error='ignore'):
181181
'''Set list of module names to try to load in forkserver process.
182182
183183
The on_error parameter controls how import failures are handled:
184-
'ignore' (default) silently ignores failures, 'warn' emits warnings,
185-
and 'fail' raises exceptions breaking the forkserver context.
184+
"ignore" (default) silently ignores failures, "warn" emits warnings,
185+
and "fail" raises exceptions breaking the forkserver context.
186186
'''
187187
from .forkserver import set_forkserver_preload
188188
set_forkserver_preload(module_names, on_error=on_error)

Lib/multiprocessing/forkserver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def set_forkserver_preload(self, modules_names, *, on_error='ignore'):
6969
'''Set list of module names to try to load in forkserver process.
7070
7171
The on_error parameter controls how import failures are handled:
72-
'ignore' (default) silently ignores failures, 'warn' emits warnings,
73-
and 'fail' raises exceptions breaking the forkserver context.
72+
"ignore" (default) silently ignores failures, "warn" emits warnings,
73+
and "fail" raises exceptions breaking the forkserver context.
7474
'''
7575
if not all(type(mod) is str for mod in modules_names):
7676
raise TypeError('module_names must be a list of strings')
@@ -226,7 +226,7 @@ def _handle_preload(preload, main_path=None, sys_path=None, on_error='ignore'):
226226
preload: List of module names to preload.
227227
main_path: Path to __main__ module if '__main__' is in preload.
228228
sys_path: sys.path to use for imports (None means use current).
229-
on_error: How to handle import errors ('ignore', 'warn', or 'fail').
229+
on_error: How to handle import errors ("ignore", "warn", or "fail").
230230
"""
231231
if not preload:
232232
return

0 commit comments

Comments
 (0)