mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
PEP 479: Use the return-keyword instead of raising StopIteration inside a generators.
This commit is contained in:
parent
828d932a2c
commit
bb6c0aaebf
6 changed files with 4 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue