summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-23 17:31:52 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-23 17:31:52 (GMT)
commit1e908af3354e20e18dfdcf30bc8aee6ab53ab1ee (patch)
treee8667db40effeb63db33a46b849aee2e4ac9e836 /Doc
parent1cae8b58eb5929b22a469e7ebb65382b808f7d04 (diff)
downloadcpython-1e908af3354e20e18dfdcf30bc8aee6ab53ab1ee.zip
cpython-1e908af3354e20e18dfdcf30bc8aee6ab53ab1ee.tar.gz
cpython-1e908af3354e20e18dfdcf30bc8aee6ab53ab1ee.tar.bz2
#6518: enable context manager protocol for ossaudiodev types.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/ossaudiodev.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst
index 3128b0a..3b5a7e4 100644
--- a/Doc/library/ossaudiodev.rst
+++ b/Doc/library/ossaudiodev.rst
@@ -159,6 +159,11 @@ and (read-only) attributes:
is only useful in non-blocking mode. Has no return value, since the amount of
data written is always equal to the amount of data supplied.
+.. versionchanged:: 3.2
+ Audio device objects also support the context manager protocol, i.e. they can
+ be used in a :keyword:`with` statement.
+
+
The following methods each map to exactly one :func:`ioctl` system call. The
correspondence is obvious: for example, :meth:`setfmt` corresponds to the
``SNDCTL_DSP_SETFMT`` ioctl, and :meth:`sync` to ``SNDCTL_DSP_SYNC`` (this can
@@ -346,6 +351,10 @@ The mixer object provides two file-like methods:
Returns the file handle number of the open mixer device file.
+.. versionchanged:: 3.2
+ Mixer objects also support the context manager protocol.
+
+
The remaining methods are specific to audio mixing: