8000 Fix #16197. Update docstrings and documentation to match winreg code. · python/cpython@e9aeca7 · GitHub
[go: up one dir, main page]

Skip to content

Commit e9aeca7

Browse files
committed
Fix #16197. Update docstrings and documentation to match winreg code.
Patch by Zachary Ware.
1 parent 92c28ca commit e9aeca7

File tree

3 files changed

+122
-92
lines changed

3 files changed

+122
-92
lines changed

Doc/library/winreg.rst

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This module offers the following functions:
6060
:exc:`WindowsError` exception is raised.
6161

6262

63-
.. function:: CreateKeyEx(key, sub_key, reserved=0, access=KEY_ALL_ACCESS)
63+
.. function:: CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE)
6464

6565
Creates or opens the specified key, returning a
6666
:ref:`handle object <handle-object>`.
@@ -70,10 +70,10 @@ This module offers the following functions:
7070

7171
*sub_key* is a string that names the key this method opens or creates.
7272

73-
*res* is a reserved integer, and must be zero. The default is zero.
73+
*reserved* is a reserved integer, and must be zero. The default is zero.
7474

75-
*sam* is an integer that specifies an access mask that describes the desired
76-
security access for the key. Default is :const:`KEY_ALL_ACCESS`. See
75+
*access* is an integer that specifies an access mask that describes the desired
76+
security access for the key. Default is :const:`KEY_WRITE`. See
7777
:ref:`Access Rights <access-rights>` for other allowed values.
7878

7979
If *key* is one of the predefined keys, *sub_key* may be ``None``. In that
@@ -103,7 +103,7 @@ This module offers the following functions:
103103
If the method fails, a :exc:`WindowsError` exception is raised.
104104

105105

106-
.. function:: DeleteKeyEx(key, sub_key, access=KEY_ALL_ACCESS, reserved=0)
106+
.. function:: DeleteKeyEx(key, sub_key, access=KEY_WOW64_64KEY, reserved=0)
107107

108108
Deletes the specified key.
109109

@@ -120,9 +120,9 @@ This module offers the following functions:
120120
*key* parameter. This value must not be ``None``, and the key may not have
121121
subkeys.
122122

123-
*res* is a reserved integer, and must be zero. The default is zero.
123+
*reserved* is a reserved integer, and must be zero. The default is zero.
124124

125-
*sam* is an integer that specifies an access mask that describes the desired
125+
*access* is an integer that specifies an access mask that describes the desired
126126
security access for the key. Default is :const:`KEY_ALL_ACCESS`. See
127127
:ref:`Access Rights <access-rights>` for other allowed values.
128128

@@ -244,6 +244,7 @@ This module offers the following functions:
244244

245245

246246
.. function:: OpenKey(key, sub_key, reserved=0, access=KEY_READ)
247+
OpenKeyEx(key, sub_key, reserved=0, access=KEY_READ)
247248

248249
Opens the specified key, returning a :ref:`handle object <handle-object>`.
249250

@@ -265,12 +266,6 @@ This module offers the following functions:
265266
.. versionchanged:: 3.2 Allow the use of named arguments.
266267

267268

268-
.. function:: OpenKeyEx()
269-
270-
The functionality of :func:`OpenKeyEx` is provided via :func:`OpenKey`,
271-
by the use of default arguments.
272-
273-
274269
.. function:: QueryInfoKey(key)
275270

276271
Returns information about a key, as a tuple.
@@ -394,11 +389,11 @@ This module offers the following functions:
394389
*value_name* is a string that names the subkey with which the value is
395390
associated.
396391

392+
*reserved* can be anything -- zero is always passed to the API.
393+
397394
*type* is an integer that specifies the type of the data. See
398395
:ref:`Value Types <value-types>` for the available types.
399396

400-
*reserved* can be anything -- zero is always passed to the API.
401-
402397
*value* is a string that specifies the new value.
403398

404399
This method can also set additional value and type information for the specified

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 3.2.4
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #16197: Update winreg docstrings and documentation to match code.
14+
Patch by Zachary Ware.
15+
1316
- Issue #14700: Fix buggy overflow checks when handling large precisions and
1417
widths in old-style and new-style formatting.
1518

0 commit comments

Comments
 (0)
0