def quad_to_dec(addr):
    """Return dotted ip address string as long integer

    Raise IPv4AddrTypeError if address is illegal.
    """

    try:
        return struct.unpack('>L', inet_aton(addr))[0]
    except socket_error:
        raise IPv4AddrTypeError(addr)
Return dotted ip address string as long integer

    Raise IPv4AddrTypeError if address is illegal.
    
recipes/Python/440560_IPv4AddressNetwork_class/recipe-440560.py