summaryrefslogtreecommitdiffstats
path: root/Lib/ipaddress.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ipaddress.py')
-rw-r--r--Lib/ipaddress.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py
index 909a55d..662d737 100644
--- a/Lib/ipaddress.py
+++ b/Lib/ipaddress.py
@@ -697,8 +697,7 @@ class _BaseNetwork(_IPAddressBase):
# dealing with another address
else:
# address
- return (int(self.network_address) <= int(other._ip) <=
- int(self.broadcast_address))
+ return other._ip & self.netmask._ip == self.network_address._ip
def overlaps(self, other):
"""Tell if self is partly contained in other."""