Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Doc/library/winreg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@ This module offers the following functions:
*type* is an integer that specifies the type of the data. See
:ref:`Value Types <value-types>` for the available types.

*value* is a string that specifies the new value.
*value* is the new value to set. Accepts str, int, list of str, bytes-like object,
Comment thread
aisk marked this conversation as resolved.
Outdated
or None depending on the *type* parameter.

This method can also set additional value and type information for the specified
key. The key identified by the key parameter must have been opened with
Expand Down Expand Up @@ -691,64 +692,78 @@ For more information, see `Registry Value Types
.. data:: REG_BINARY

Binary data in any form.
You should pass a :term:`bytes-like object` or :const:`None` in Python for this type.
Comment thread
aisk marked this conversation as resolved.
Outdated

.. data:: REG_DWORD

32-bit number.
You should pass an :class:`int` or :const:`None` in Python for this type.

.. data:: REG_DWORD_LITTLE_ENDIAN

A 32-bit number in little-endian format. Equivalent to :const:`REG_DWORD`.
You should pass an :class:`int` or :const:`None` in Python for this type.

.. data:: REG_DWORD_BIG_ENDIAN

A 32-bit number in big-endian format.
You should pass an :class:`int` or :const:`None` in Python for this type.

.. data:: REG_EXPAND_SZ

Null-terminated string containing references to environment
variables (``%PATH%``).
You should pass a :class:`str` or :const:`None` in Python for this type.

.. data:: REG_LINK

A Unicode symbolic link.
You should pass a :term:`bytes-like object` or :const:`None` in Python for this type.

.. data:: REG_MULTI_SZ

A sequence of null-terminated strings, terminated by two null characters.
(Python handles this termination automatically.)
You should pass a :class:`list` of :class:`str` or :const:`None` in Python for this type.

.. data:: REG_NONE

No defined value type.
You should pass a :term:`bytes-like object` or :const:`None` in Python for this type.

.. data:: REG_QWORD

A 64-bit number.
You should pass an :class:`int` or :const:`None` in Python for this type.

.. versionadded:: 3.6

.. data:: REG_QWORD_LITTLE_ENDIAN

A 64-bit number in little-endian format. Equivalent to :const:`REG_QWORD`.
You should pass an :class:`int` or :const:`None` in Python for this type.

.. versionadded:: 3.6

.. data:: REG_RESOURCE_LIST

A device-driver resource list.
You should pass a :term:`bytes-like object` or :const:`None` in Python for this type.

.. data:: REG_FULL_RESOURCE_DESCRIPTOR

A hardware setting.
You should pass a :term:`bytes-like object` or :const:`None` in Python for this type.

.. data:: REG_RESOURCE_REQUIREMENTS_LIST

A hardware resource list.
You should pass a :term:`bytes-like object` or :const:`None` in Python for this type.

.. data:: REG_SZ

A null-terminated string.
You should pass a :class:`str` or :const:`None` in Python for this type.


.. _handle-object:
Expand Down
3 changes: 2 additions & 1 deletion PC/winreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,8 @@ winreg.SetValueEx
REG_RESOURCE_LIST -- A device-driver resource list.
REG_SZ -- A null-terminated string.
value: object
A string that specifies the new value.
The new value to set. Accepts str, int, list of str, bytes-like object,
or None depending on the type parameter.
/

Stores data in the value field of an open registry key.
Expand Down
Loading