def address_type(address):
 if (type(address) == tuple):
  return 'AF_INET'
 elif ((type(address) is str) and address.startswith('\\\\')):
  return 'AF_PIPE'
 elif (type(address) is str):
  return 'AF_UNIX'
 else:
  raise ValueError(('address type of %r unrecognized' % address))

def address_type ( address ) : if ( type ( address ) == tuple ) : return 'AF_INET' elif ( ( type ( address ) is str ) and address . startswith ( '\\\\' ) ) : return 'AF_PIPE' elif ( type ( address ) is str ) : return 'AF_UNIX' else : raise ValueError ( ( 'address type of %r unrecognized' % address ) )
return appropriate record type for an address .