Returns:
The binary representation of this address.
"""
- return Bytes(struct.pack("!QQ", address >> 64, address & (2 ** 64 - 1)))
+ return Bytes(struct.pack("!QQ", address >> 64, address & (2**64 - 1)))
def _find_address_range(addresses):
nbits = _count_righthand_zero_bits(first_int, ip_bits)
current = None
while nbits >= 0:
- addend = 2 ** nbits - 1
+ addend = 2**nbits - 1
current = first_int + addend
nbits -= 1
if current <= last_int:
"""
# Equivalent to 255.255.255.255 or 32 bits of 1's.
- _ALL_ONES = (2 ** IPV4LENGTH) - 1
+ _ALL_ONES = (2**IPV4LENGTH) - 1
_DECIMAL_DIGITS = frozenset("0123456789")
def __init__(self, address):
"""
- _ALL_ONES = (2 ** IPV6LENGTH) - 1
+ _ALL_ONES = (2**IPV6LENGTH) - 1
_HEXTET_COUNT = 8
_HEX_DIGITS = frozenset("0123456789ABCDEFabcdef")