コード例 #1
0
ファイル: transforms.py プロジェクト: songzcn/pytype
  def __init__(self, matcher):
    """Initialize this visitor.

    Args:
      matcher: A class with a "Match" method, used for matching function
        argument types.
    """
    super(ExtractOperators, self).__init__()
    # class name -> op name -> list of signatures
    self.operators = collections.defaultdict(
        lambda: collections.defaultdict(list))
    self._slots = slots.ReverseSlotMapping()
    self.matcher = matcher
コード例 #2
0
ファイル: slots_test.py プロジェクト: rezeik/pytype
 def testReverseSlotMapping(self):
     slots.ReverseSlotMapping().get("__radd__")  # smoke test