diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py index c389f05288..cf2990f064 100644 --- a/Lib/ipaddress.py +++ b/Lib/ipaddress.py @@ -774,9 +774,7 @@ class _BaseNetwork(_IPAddressBase): def overlaps(self, other): """Tell if self is partly contained in other.""" return self.network_address in other or ( - self.broadcast_address in other or ( - other.network_address in self or ( - other.broadcast_address in self))) + other.network_address in self) @functools.cached_property def broadcast_address(self):