Skip to content

Commit bd322b0

Browse files
committed
Update by review comments
1 parent 6c5c4ae commit bd322b0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Doc/library/winreg.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,9 @@ Handle objects provide semantics for :meth:`~object.__bool__` -- thus ::
771771
will print ``Yes`` if the handle is currently valid (has not been closed or
772772
detached).
773773

774-
The object also support comparison semantics, so handle objects will compare
775-
true if they both reference the same underlying Windows handle value. Closed
776-
handle objects (those with a handle value of zero) always compare equal.
774+
The object also support equality comparison semantics, so handle objects will
775+
compare equal if they both reference the same underlying Windows handle value.
776+
Closed handle objects (those with a handle value of zero) always compare equal.
777777

778778
Handle objects can be converted to an integer (e.g., using the built-in
779779
:func:`int` function), in which case the underlying Windows handle value is
@@ -818,4 +818,4 @@ integer handle, and also disconnect the Windows handle from the handle object.
818818

819819
.. versionchanged:: next
820820
Handle objects are now compared by their underlying Windows handle value
821-
instead of object identity.
821+
instead of object identity for equality comparisons.

Lib/test/test_winreg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,9 @@ def test_hkey_comparison(self):
220220
self.addCleanup(CloseKey, key3)
221221

222222
self.assertEqual(key1.handle, key2.handle)
223-
self.assertEqual(key1, key2)
224223
self.assertTrue(key1 == key2)
225224
self.assertFalse(key1 != key2)
226225

227-
self.assertNotEqual(key1, key3)
228226
self.assertTrue(key1 != key3)
229227
self.assertFalse(key1 == key3)
230228

0 commit comments

Comments
 (0)