1. python_mirrors
  2. features/pep-420


sandrotosi  committed f4f2139 Draft

Issue #14814: minor improvements as suggested by Hynek Schlawack

  • Participants
  • Parent commits 0be2966
  • Branches default

Comments (0)

Files changed (1)

File Lib/ipaddress.py

View file
  • Ignore whitespace
 # Copyright 2007 Google Inc.
 #  Licensed to PSF under a Contributor Agreement.
         The IPv?Interface classes describe an Address on a particular
         Network, so they're basically a combination of both the Address
         and Network classes.
     if version is not None:
         if version == 4:
         ValueError: If the integer is negative or too large to be an
           IPv4 IP address.
         return struct.pack('!I', address)
         The integer address packed as 16 bytes in network (big-endian) order.
         return struct.pack('!QQ', address >> 64, address & (2**64 - 1))
     return (first, last)
 def _get_prefix_length(number1, number2, bits):
     """Get the number of leading bits that are same for two numbers.
             return bits - i
     return 0
 def _count_righthand_zero_bits(number, bits):
     """Count the number of zero bits on the right hand side.
         first_int = current + 1
         first = ip_address(first_int, version=first._version)
 def _collapse_addresses_recursive(addresses):
     """Loops through the addresses, collapsing concurrent netblocks.
     def hosts(self):
         """Generate Iterator over usable hosts in a network.
-           This is like __iter__ except it doesn't return the network
-           or broadcast addresses.
+        This is like __iter__ except it doesn't return the network
+        or broadcast addresses.
         cur = int(self.network_address) + 1
 class IPv6Address(_BaseV6, _BaseAddress):
-    """Represent and manipulate single IPv6 Addresses.
-    """
+    """Represent and manipulate single IPv6 Addresses."""
     def __init__(self, address):
         """Instantiate a new IPv6 address object.