https://github.com/python/cpython/commit/ac0ecb0f5dbf13dcbd53895d6e492185b81dc407 commit: ac0ecb0f5dbf13dcbd53895d6e492185b81dc407 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2025-11-04T16:36:46Z summary:
[3.13] gh-140826 Remove the wrong documents about comparison behavior on winreg.HKEYType (GH-140999) (GH-141003) (cherry picked from commit c3f9702f04f64f9cf9848b9a51a4aead4a612fa1) Co-authored-by: AN Long <[email protected]> files: M Doc/library/winreg.rst M PC/winreg.c diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst index b3a824fb69a49f..52c6c1a82821ba 100644 --- a/Doc/library/winreg.rst +++ b/Doc/library/winreg.rst @@ -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 diff --git a/PC/winreg.c b/PC/winreg.c index efdf8addc06186..75e93f7d8dd7d2 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -103,8 +103,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."); +"__int__ - Converting a handle to an integer returns the Win32 handle."); _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
