summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/ctypes.rst1
-rw-r--r--Doc/library/optparse.rst4
-rw-r--r--Doc/library/threading.rst11
3 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 47f9819..e389a63 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -1272,6 +1272,7 @@ library to load.
.. data:: find_library(name)
+ :module: ctypes.util
:noindex:
Try to find a library and return a pathname. *name* is the library name without
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 4e9bb23..2cf8042 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -1506,7 +1506,7 @@ Here's an example of a callback option that takes no arguments, and simply
records that the option was seen::
def record_foo_seen(option, opt_str, value, parser):
- parser.saw_foo = True
+ parser.values.saw_foo = True
parser.add_option("--foo", action="callback", callback=record_foo_seen)
@@ -1646,7 +1646,7 @@ arguments::
value.append(arg)
del parser.rargs[:len(value)]
- setattr(parser.values, option.dest, value))
+ setattr(parser.values, option.dest, value)
[...]
parser.add_option("-c", "--callback", dest="vararg_attr",
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 769afd4..6090568 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -198,7 +198,7 @@ changed through the :attr:`name` attribute.
A thread can be flagged as a "daemon thread". The significance of this flag is
that the entire Python program exits when only daemon threads are left. The
initial value is inherited from the creating thread. The flag can be set
-through the :attr:`daemon` attribute.
+through the :attr:`daemon` property.
There is a "main thread" object; this corresponds to the initial thread of
control in the Python program. It is not a daemon thread.
@@ -312,10 +312,11 @@ impossible to detect the termination of alien threads.
.. attribute:: Thread.daemon
- The thread's daemon flag. This must be set before :meth:`start` is called,
- otherwise :exc:`RuntimeError` is raised.
-
- The initial value is inherited from the creating thread.
+ A boolean value indicating whether this thread is a daemon thread (True) or
+ not (False). This must be set before :meth:`start` is called, otherwise
+ :exc:`RuntimeError` is raised. Its initial value is inherited from the
+ creating thread; the main thread is not a daemon thread and therefore all
+ threads created in the main thread default to :attr:`daemon` = ``False``.
The entire Python program exits when no alive non-daemon threads are left.