MCPcopy Index your code
hub / github.com/python/cpython / is_global

Method is_global

Lib/ipaddress.py:1553–1563  ·  view source on GitHub ↗

Test if this address is allocated for public networks. Returns: A boolean, True if the address is not reserved per iana-ipv4-special-registry.

(self)

Source from the content-addressed store, hash-verified

1551 @property
1552 @functools.lru_cache()
1553 def is_global(self):
1554 """Test if this address is allocated for public networks.
1555
1556 Returns:
1557 A boolean, True if the address is not reserved per
1558 iana-ipv4-special-registry.
1559
1560 """
1561 return (not (self.network_address in IPv4Network('100.64.0.0/10') and
1562 self.broadcast_address in IPv4Network('100.64.0.0/10')) and
1563 not self.is_private)
1564
1565
1566class _IPv4Constants:

Callers

nothing calls this directly

Calls 1

IPv4NetworkClass · 0.85

Tested by

no test coverage detected