Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteeabe2a

Browse files
committed
gh-134062: Fix hash collisions in IPv4Network and IPv6Network
1 parent74c4e35 commiteeabe2a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎Lib/ipaddress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def __eq__(self, other):
729729
returnNotImplemented
730730

731731
def__hash__(self):
732-
returnhash(int(self.network_address)^int(self.netmask))
732+
returnhash((int(self.network_address),int(self.netmask)))
733733

734734
def__contains__(self,other):
735735
# always false if one is v4 and the other is v6.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix hash collisions in:class:`IPv4Network` and:class:`IPv6Network`.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp