@@ -12,6 +12,17 @@ integer as the registry handle, a :ref:`handle object <handle-object>` is used
1212to ensure that the handles are closed correctly, even if the programmer neglects
1313to explicitly close them.
1414
15+ .. _exception-changed :
16+
17+ .. versionchanged :: 3.3
18+ Several functions in this module used to raise a
19+ :exc: `WindowsError `, which is now an alias of :exc: `OSError `.
20+
21+ .. _functions :
22+
23+ Functions
24+ ------------------
25+
1526This module offers the following functions:
1627
1728
@@ -37,12 +48,11 @@ This module offers the following functions:
3748
3849 *key * is the predefined handle to connect to.
3950
40- The return value is the handle of the opened key. If the function fails, a
51+ The return value is the handle of the opened key. If the function fails, an
4152 :exc: `OSError ` exception is raised.
4253
4354 .. versionchanged :: 3.3
44- This function used to raise a :exc: `WindowsError `, which is now an
45- alias of :exc: `OSError `.
55+ See :ref: `above <exception-changed >`.
4656
4757
4858.. function :: CreateKey(key, sub_key)
@@ -60,12 +70,11 @@ This module offers the following functions:
6070
6171 If the key already exists, this function opens the existing key.
6272
63- The return value is the handle of the opened key. If the function fails, a
73+ The return value is the handle of the opened key. If the function fails, an
6474 :exc: `OSError ` exception is raised.
6575
6676 .. versionchanged :: 3.3
67- This function used to raise a :exc: `WindowsError `, which is now an
68- alias of :exc: `OSError `.
77+ See :ref: `above <exception-changed >`.
6978
7079
7180.. function :: CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE)
@@ -89,14 +98,13 @@ This module offers the following functions:
8998
9099 If the key already exists, this function opens the existing key.
91100
92- The return value is the handle of the opened key. If the function fails, a
101+ The return value is the handle of the opened key. If the function fails, an
93102 :exc: `OSError ` exception is raised.
94103
95104 .. versionadded :: 3.2
96105
97106 .. versionchanged :: 3.3
98- This function used to raise a :exc: `WindowsError `, which is now an
99- alias of :exc: `OSError `.
107+ See :ref: `above <exception-changed >`.
100108
101109
102110.. function :: DeleteKey(key, sub_key)
@@ -112,11 +120,10 @@ This module offers the following functions:
112120 *This method can not delete keys with subkeys. *
113121
114122 If the method succeeds, the entire key, including all of its values, is removed.
115- If the method fails, a :exc: `OSError ` exception is raised.
123+ If the method fails, an :exc: `OSError ` exception is raised.
116124
117125 .. versionchanged :: 3.3
118- This function used to raise a :exc: `WindowsError `, which is now an
119- alias of :exc: `OSError `.
126+ See :ref: `above <exception-changed >`.
120127
121128
122129.. function :: DeleteKeyEx(key, sub_key, access=KEY_WOW64_64KEY, reserved=0)
@@ -145,15 +152,14 @@ This module offers the following functions:
145152 *This method can not delete keys with subkeys. *
146153
147154 If the method succeeds, the entire key, including all of its values, is
148- removed. If the method fails, a :exc: `OSError ` exception is raised.
155+ removed. If the method fails, an :exc: `OSError ` exception is raised.
149156
150157 On unsupported Windows versions, :exc: `NotImplementedError ` is raised.
151158
152159 .. versionadded :: 3.2
153160
154161 .. versionchanged :: 3.3
155- This function used to raise a :exc: `WindowsError `, which is now an
156- alias of :exc: `OSError `.
162+ See :ref: `above <exception-changed >`.
157163
158164
159165.. function :: DeleteValue(key, value)
@@ -176,12 +182,11 @@ This module offers the following functions:
176182 *index * is an integer that identifies the index of the key to retrieve.
177183
178184 The function retrieves the name of one subkey each time it is called. It is
179- typically called repeatedly until a :exc: `OSError ` exception is
185+ typically called repeatedly until an :exc: `OSError ` exception is
180186 raised, indicating, no more values are available.
181187
182188 .. versionchanged :: 3.3
183- This function used to raise a :exc: `WindowsError `, which is now an
184- alias of :exc: `OSError `.
189+ See :ref: `above <exception-changed >`.
185190
186191
187192.. function :: EnumValue(key, index)
@@ -194,7 +199,7 @@ This module offers the following functions:
194199 *index * is an integer that identifies the index of the value to retrieve.
195200
196201 The function retrieves the name of one subkey each time it is called. It is
197- typically called repeatedly, until a :exc: `OSError ` exception is
202+ typically called repeatedly, until an :exc: `OSError ` exception is
198203 raised, indicating no more values.
199204
200205 The result is a tuple of 3 items:
@@ -214,8 +219,7 @@ This module offers the following functions:
214219 +-------+--------------------------------------------+
215220
216221 .. versionchanged :: 3.3
217- This function used to raise a :exc: `WindowsError `, which is now an
218- alias of :exc: `OSError `.
222+ See :ref: `above <exception-changed >`.
219223
220224
221225.. function :: ExpandEnvironmentStrings(str)
@@ -295,8 +299,7 @@ This module offers the following functions:
295299 Allow the use of named arguments.
296300
297301 .. versionchanged :: 3.3
298- This function used to raise a :exc: `WindowsError `, which is now an
299- alias of :exc: `OSError `.
302+ See :ref: `above <exception-changed >`.
300303
301304
302305.. function :: QueryInfoKey(key)
0 commit comments