summaryrefslogtreecommitdiffstats
path: root/Lib/ipaddress.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-08-05 12:45:22 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-08-05 12:45:22 (GMT)
commite3ded955f3b145e38be47be61c53ba1ff130f47b (patch)
treee6e00295546d9b6d363789733e20ee2d754c9031 /Lib/ipaddress.py
parent7362c3efeb49f6656819a0842f9e5fe358d390da (diff)
downloadcpython-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.py10
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)