diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2012-08-05 12:45:22 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-08-05 12:45:22 (GMT) |
commit | e3ded955f3b145e38be47be61c53ba1ff130f47b (patch) | |
tree | e6e00295546d9b6d363789733e20ee2d754c9031 /Lib/ipaddress.py | |
parent | 7362c3efeb49f6656819a0842f9e5fe358d390da (diff) | |
download | cpython-e3ded955f3b145e38be47be61c53ba1ff130f47b.zip cpython-e3ded955f3b145e38be47be61c53ba1ff130f47b.tar.gz cpython-e3ded955f3b145e38be47be61c53ba1ff130f47b.tar.bz2 |
Issue #14814: Remove redundant property from interface objects - prefixlen can be accessed via the associated network object
Diffstat (limited to 'Lib/ipaddress.py')
-rw-r--r-- | Lib/ipaddress.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py index dfb5944..c9338c5 100644 --- a/Lib/ipaddress.py +++ b/Lib/ipaddress.py @@ -1331,10 +1331,6 @@ class IPv4Interface(IPv4Address): return self._ip ^ self._prefixlen ^ int(self.network.network_address) @property - def prefixlen(self): - return self._prefixlen - - @property def ip(self): return IPv4Address(self._ip) @@ -1708,7 +1704,7 @@ class _BaseV6: hex_str = '%032x' % ip_int parts = [hex_str[x:x+4] for x in range(0, 32, 4)] if isinstance(self, (_BaseNetwork, IPv6Interface)): - return '%s/%d' % (':'.join(parts), self.prefixlen) + return '%s/%d' % (':'.join(parts), self._prefixlen) return ':'.join(parts) @property @@ -1947,10 +1943,6 @@ class IPv6Interface(IPv6Address): return self._ip ^ self._prefixlen ^ int(self.network.network_address) @property - def prefixlen(self): - return self._prefixlen - - @property def ip(self): return IPv6Address(self._ip) |