def getSocketFamily(socket):
 if _PY3:
  return socket.family
 else:
  return getsockfam(socket.fileno())

def getSocketFamily ( socket ) : if _PY3 : return socket . family else : return getsockfam ( socket . fileno ( ) )
return the family of the given socket .