summaryrefslogtreecommitdiffstats
path: root/Lib/ipaddress.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2014-11-23 06:14:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2014-11-23 06:14:41 (GMT)
commitbb6c0aaebfbeb9ab13886e261df904c9c12853b9 (patch)
treeaa283779a1ce070feb4c59a8c5cf624d3830059c /Lib/ipaddress.py
parent828d932a2c4da5eb7c05e85dfe51f5f6db68084d (diff)
downloadcpython-bb6c0aaebfbeb9ab13886e261df904c9c12853b9.zip
cpython-bb6c0aaebfbeb9ab13886e261df904c9c12853b9.tar.gz
cpython-bb6c0aaebfbeb9ab13886e261df904c9c12853b9.tar.bz2
PEP 479: Use the return-keyword instead of raising StopIteration inside a generators.
Diffstat (limited to 'Lib/ipaddress.py')
-rw-r--r--Lib/ipaddress.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py
index d15a1d9..b32a7e1 100644
--- a/Lib/ipaddress.py
+++ b/Lib/ipaddress.py
@@ -808,7 +808,7 @@ class _BaseNetwork(_IPAddressBase):
other.broadcast_address <= self.broadcast_address):
raise ValueError('%s not contained in %s' % (other, self))
if other == self:
- raise StopIteration
+ return
# Make sure we're comparing the network of other.
other = other.__class__('%s/%s' % (other.network_address,