Skip to content

Commit d4bdcbc

Browse files
author
David Groves
committed
Fixes
1 parent c48a496 commit d4bdcbc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Lib/ipaddress.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -757,11 +757,11 @@ def hostmask(self):
757757

758758
@functools.cached_property
759759
def first_address(self):
760-
return self._address_class(int(self.network_address))
760+
return self._address_class(int(self.first_address))
761761

762762
@functools.cached_property
763763
def last_address(self):
764-
return self._address_class(int(self.network_address) |
764+
return self._address_class(int(self.first_address) |
765765
int(self.hostmask))
766766

767767
@property
@@ -1563,7 +1563,7 @@ def is_global(self):
15631563
15641564
"""
15651565
return (not (self.first_address in IPv4Network('100.64.0.0/10') and
1566-
self.broadcast_address in IPv4Network('100.64.0.0/10')) and
1566+
self.last_address in IPv4Network('100.64.0.0/10')) and
15671567
not self.is_private)
15681568

15691569
@functools.cached_property
@@ -2373,12 +2373,12 @@ def subnet_router_anycast_address(self):
23732373
return self.first_address
23742374

23752375
@functools.cached_property
2376-
@warnings.deprecated("IPv6 has no network addresses, use first_address or subnet_router_anycast_address instead.")
2376+
@warnings.deprecated("IPv6 has no network addresses, consider using first_address or subnet_router_anycast_address instead.")
23772377
def network_address(self):
23782378
return self.first_address
23792379

23802380
@functools.cached_property
2381-
@warnings.deprecated("IPv6 has no broadcast addresses, use last_address instead for the address with all the host bits set.")
2381+
@warnings.deprecated("IPv6 has no broadcast addresses, consider using last_address instead.")
23822382
def broadcast_address(self):
23832383
return self.last_address
23842384

0 commit comments

Comments
 (0)