Fix #16197. Update docstrings and documentation to match winreg code.

Patch by Zachary Ware.
This commit is contained in:
Brian Curtin 2012-10-29 18:16:39 -05:00
parent 92c28cace4
commit e9aeca7c24
3 changed files with 122 additions and 92 deletions

View file

@ -60,7 +60,7 @@ This module offers the following functions:
:exc:`WindowsError` exception is raised.
.. function:: CreateKeyEx(key, sub_key, reserved=0, access=KEY_ALL_ACCESS)
.. function:: CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE)
Creates or opens the specified key, returning a
:ref:`handle object <handle-object>`.
@ -70,10 +70,10 @@ This module offers the following functions:
*sub_key* is a string that names the key this method opens or creates.
*res* is a reserved integer, and must be zero. The default is zero.
*reserved* is a reserved integer, and must be zero. The default is zero.
*sam* is an integer that specifies an access mask that describes the desired
security access for the key. Default is :const:`KEY_ALL_ACCESS`. See
*access* is an integer that specifies an access mask that describes the desired
security access for the key. Default is :const:`KEY_WRITE`. See
:ref:`Access Rights <access-rights>` for other allowed values.
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:
If the method fails, a :exc:`WindowsError` exception is raised.
.. function:: DeleteKeyEx(key, sub_key, access=KEY_ALL_ACCESS, reserved=0)
.. function:: DeleteKeyEx(key, sub_key, access=KEY_WOW64_64KEY, reserved=0)
Deletes the specified key.
@ -120,9 +120,9 @@ This module offers the following functions:
*key* parameter. This value must not be ``None``, and the key may not have
subkeys.
*res* is a reserved integer, and must be zero. The default is zero.
*reserved* is a reserved integer, and must be zero. The default is zero.
*sam* is an integer that specifies an access mask that describes the desired
*access* is an integer that specifies an access mask that describes the desired
security access for the key. Default is :const:`KEY_ALL_ACCESS`. See
:ref:`Access Rights <access-rights>` for other allowed values.
@ -244,6 +244,7 @@ This module offers the following functions:
.. function:: OpenKey(key, sub_key, reserved=0, access=KEY_READ)
OpenKeyEx(key, sub_key, reserved=0, access=KEY_READ)
Opens the specified key, returning a :ref:`handle object <handle-object>`.
@ -265,12 +266,6 @@ This module offers the following functions:
.. versionchanged:: 3.2 Allow the use of named arguments.
.. function:: OpenKeyEx()
The functionality of :func:`OpenKeyEx` is provided via :func:`OpenKey`,
by the use of default arguments.
.. function:: QueryInfoKey(key)
Returns information about a key, as a tuple.
@ -394,11 +389,11 @@ This module offers the following functions:
*value_name* is a string that names the subkey with which the value is
associated.
*reserved* can be anything -- zero is always passed to the API.
*type* is an integer that specifies the type of the data. See
:ref:`Value Types <value-types>` for the available types.
*reserved* can be anything -- zero is always passed to the API.
*value* is a string that specifies the new value.
This method can also set additional value and type information for the specified