blob: 5d6ffd7555a14656fa333e3d7598057a47925f53 [file] [log] [blame]
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Selects the appropriate operator."""
def GetOperator(operator):
"""Given an operator by name, returns its module.
operator: string describing the comparison
# TODO(jhaas): come up with a happy way of integrating multiple operators
# with different, possibly divergent and possibly convergent, operators.
module = __import__(operator, globals(), locals(), [''])
return module