blob: 5d6ffd7555a14656fa333e3d7598057a47925f53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# 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.
Args:
operator: string describing the comparison
Returns:
module
"""
# 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
|