summaryrefslogtreecommitdiffstats
path: root/Doc/library/winreg.rst
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-31 17:29:33 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-31 17:29:33 (GMT)
commit616f8035a8d7cdbb34f8a6a485d8d9d83767d207 (patch)
tree537d28d85fbbfc4ea73322672e9939c04608d535 /Doc/library/winreg.rst
parent08d8434526343205bbb8406b7e1f5b63a11f36fb (diff)
downloadcpython-616f8035a8d7cdbb34f8a6a485d8d9d83767d207.zip
cpython-616f8035a8d7cdbb34f8a6a485d8d9d83767d207.tar.gz
cpython-616f8035a8d7cdbb34f8a6a485d8d9d83767d207.tar.bz2
Issue #16197: Fix several small errors in winreg documentation.
Initial patch by Zachary Ware.
Diffstat (limited to 'Doc/library/winreg.rst')
-rw-r--r--Doc/library/winreg.rst49
1 files changed, 26 insertions, 23 deletions
diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst
index c05ee2c..60f3bd9 100644
--- a/Doc/library/winreg.rst
+++ b/Doc/library/winreg.rst
@@ -12,6 +12,17 @@ integer as the registry handle, a :ref:`handle object <handle-object>` is used
to ensure that the handles are closed correctly, even if the programmer neglects
to explicitly close them.
+.. _exception-changed:
+
+.. versionchanged:: 3.3
+ Several functions in this module used to raise a
+ :exc:`WindowsError`, which is now an alias of :exc:`OSError`.
+
+.. _functions:
+
+Functions
+------------------
+
This module offers the following functions:
@@ -37,12 +48,11 @@ This module offers the following functions:
*key* is the predefined handle to connect to.
- The return value is the handle of the opened key. If the function fails, a
+ The return value is the handle of the opened key. If the function fails, an
:exc:`OSError` exception is raised.
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: CreateKey(key, sub_key)
@@ -60,12 +70,11 @@ This module offers the following functions:
If the key already exists, this function opens the existing key.
- The return value is the handle of the opened key. If the function fails, a
+ The return value is the handle of the opened key. If the function fails, an
:exc:`OSError` exception is raised.
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE)
@@ -89,14 +98,13 @@ This module offers the following functions:
If the key already exists, this function opens the existing key.
- The return value is the handle of the opened key. If the function fails, a
+ The return value is the handle of the opened key. If the function fails, an
:exc:`OSError` exception is raised.
.. versionadded:: 3.2
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: DeleteKey(key, sub_key)
@@ -112,11 +120,10 @@ This module offers the following functions:
*This method can not delete keys with subkeys.*
If the method succeeds, the entire key, including all of its values, is removed.
- If the method fails, a :exc:`OSError` exception is raised.
+ If the method fails, an :exc:`OSError` exception is raised.
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: DeleteKeyEx(key, sub_key, access=KEY_WOW64_64KEY, reserved=0)
@@ -145,15 +152,14 @@ This module offers the following functions:
*This method can not delete keys with subkeys.*
If the method succeeds, the entire key, including all of its values, is
- removed. If the method fails, a :exc:`OSError` exception is raised.
+ removed. If the method fails, an :exc:`OSError` exception is raised.
On unsupported Windows versions, :exc:`NotImplementedError` is raised.
.. versionadded:: 3.2
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: DeleteValue(key, value)
@@ -176,12 +182,11 @@ This module offers the following functions:
*index* is an integer that identifies the index of the key to retrieve.
The function retrieves the name of one subkey each time it is called. It is
- typically called repeatedly until a :exc:`OSError` exception is
+ typically called repeatedly until an :exc:`OSError` exception is
raised, indicating, no more values are available.
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: EnumValue(key, index)
@@ -194,7 +199,7 @@ This module offers the following functions:
*index* is an integer that identifies the index of the value to retrieve.
The function retrieves the name of one subkey each time it is called. It is
- typically called repeatedly, until a :exc:`OSError` exception is
+ typically called repeatedly, until an :exc:`OSError` exception is
raised, indicating no more values.
The result is a tuple of 3 items:
@@ -214,8 +219,7 @@ This module offers the following functions:
+-------+--------------------------------------------+
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: ExpandEnvironmentStrings(str)
@@ -295,8 +299,7 @@ This module offers the following functions:
Allow the use of named arguments.
.. versionchanged:: 3.3
- This function used to raise a :exc:`WindowsError`, which is now an
- alias of :exc:`OSError`.
+ See :ref:`above <exception-changed>`.
.. function:: QueryInfoKey(key)