Skip to content
Merged
Show file tree
Hide file tree
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: 0 additions & 3 deletions Doc/library/winreg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,6 @@ Handle objects provide semantics for :meth:`~object.__bool__` -- thus ::
will print ``Yes`` if the handle is currently valid (has not been closed or
detached).

The object also support comparison semantics, so handle objects will compare
true if they both reference the same underlying Windows handle value.

Handle objects can be converted to an integer (e.g., using the built-in
:func:`int` function), in which case the underlying Windows handle value is
returned. You can also use the :meth:`~PyHKEY.Detach` method to return the
Expand Down
3 changes: 1 addition & 2 deletions PC/winreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ PyDoc_STRVAR(PyHKEY_doc,
"\n"
"Operations:\n"
"__bool__ - Handles with an open object return true, otherwise false.\n"
"__int__ - Converting a handle to an integer returns the Win32 handle.\n"
"rich comparison - Handle objects are compared using the handle value.");
Copy link
Member

Choose a reason for hiding this comment

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

We need to update this in main too. Maybe use __eq__?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, thank you for your review. The docstring for this module is missing a few other functions (the DeleteTree) as well, besides this one, I’ll make a PR to sync them all tomorrow.

"__int__ - Converting a handle to an integer returns the Win32 handle.");



Expand Down
Loading