@@ -299,8 +299,8 @@ This module offers the following functions:
299299 .. audit-event :: winreg.LoadKey key,sub_key,file_name winreg.LoadKey
300300
301301
302- .. function :: OpenKey(key, sub_key, reserved=0, access=KEY_READ)
303- OpenKeyEx(key, sub_key, reserved=0, access=KEY_READ)
302+ .. function :: OpenKey(key, sub_key, reserved=0, access=KEY_READ, options=0 )
303+ OpenKeyEx(key, sub_key, reserved=0, access=KEY_READ, options=0 )
304304
305305 Opens the specified key, returning a :ref: `handle object <handle-object >`.
306306
@@ -309,12 +309,20 @@ This module offers the following functions:
309309
310310 *sub_key * is a string that identifies the sub_key to open.
311311
312- *reserved * is a reserved integer, and must be zero. The default is zero.
312+ *reserved * is a reserved integer and should be zero.
313+ If it is not zero, it will be treated as the options parameter.
314+ You should use the *options * parameter directly instead,
315+ this parameter is only included for compatibility reasons.
316+ The default value is zero.
313317
314318 *access * is an integer that specifies an access mask that describes the desired
315319 security access for the key. Default is :const: `KEY_READ `. See :ref: `Access
316320 Rights <access-rights>` for other allowed values.
317321
322+ *options * specifies the option to apply when opening the key.
323+ Can be zero or one of the predefined
324+ :ref: `REG_OPTION_* constants <hkey-constants >`.
325+
318326 The result is a new handle to the specified key.
319327
320328 If the function fails, :exc: `OSError ` is raised.
0 commit comments