Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-42018: winreg SetValue(Ex) should mention integer as an acceptable value #22671

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
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
3 changes: 1 addition & 2 deletions Doc/library/winreg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ 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 a string or integer that specifies the new value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be not only a string or integer. Acceptable types depend on the type argument.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically None, str, int, list (of str) or implements the buffer protocol.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it is better to document what types are acceptable for specific value of the type argument in the corresponding section value-types.


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 @@ -802,4 +802,3 @@ integer handle, and also disconnect the Windows handle from the handle object.

will automatically close *key* when control leaves the :keyword:`with` block.