@@ -984,7 +984,7 @@ def is_private(self): |
|
|
984 |
984 |
|
985 |
985 |
@property |
986 |
986 |
def is_global(self): |
987 |
|
-"""Test if this address is allocated for private networks. |
|
987 |
+"""Test if this address is allocated for public networks. |
988 |
988 |
|
989 |
989 |
Returns: |
990 |
990 |
A boolean, True if the address is not reserved per |
@@ -1233,6 +1233,7 @@ def is_reserved(self): |
|
|
1233 |
1233 |
return self in reserved_network |
1234 |
1234 |
|
1235 |
1235 |
@property |
|
1236 |
+@functools.lru_cache() |
1236 |
1237 |
def is_private(self): |
1237 |
1238 |
"""Test if this address is allocated for private networks. |
1238 |
1239 |
|
@@ -1259,14 +1260,14 @@ def is_private(self): |
|
|
1259 |
1260 |
|
1260 |
1261 |
@property |
1261 |
1262 |
def is_global(self): |
1262 |
|
-"""Test if this address is allocated for private networks. |
|
1263 |
+"""Test if this address is allocated for public networks. |
1263 |
1264 |
|
1264 |
1265 |
Returns: |
1265 |
1266 |
A boolean, True if the address is not reserved per |
1266 |
1267 |
iana-ipv4-special-registry. |
1267 |
1268 |
|
1268 |
1269 |
""" |
1269 |
|
-return not self.is_private |
|
1270 |
+return self in IPv4Network('100.64.0.0/10') or not self.is_private |
1270 |
1271 |
|
1271 |
1272 |
|
1272 |
1273 |
@property |
@@ -1856,6 +1857,7 @@ def is_site_local(self): |
|
|
1856 |
1857 |
return self in sitelocal_network |
1857 |
1858 |
|
1858 |
1859 |
@property |
|
1860 |
+@functools.lru_cache() |
1859 |
1861 |
def is_private(self): |
1860 |
1862 |
"""Test if this address is allocated for private networks. |
1861 |
1863 |
|