original_docstring: Calculates the services generated for the given thrift IDL source.
    Returns an interable of services
    
docstring: Calculates the services generated for the given thrift IDL source.
  Returns an interable of services
docstring_tokens: Calculates the services generated for the given thrift IDL source . Returns an interable of services
code: def calculate_services(source):
    """Calculates the services generated for the given thrift IDL source.
    Returns an interable of services
    """
  
    with open(source, 'r') as thrift:
      namespaces = dict()
      types = defaultdict(set)
      for line in thrift:
        match = NAMESPACE_PARSER.match(line)
        if match:
          lang = match.group(1)
          namespace = match.group(2)
          namespaces[lang] = namespace
        else:
          match = TYPE_PARSER.match(line)
          if match:
            typename = match.group(1)
            name = match.group(2)
            types[typename].add(name)
  
      return types['service']
code_tokens: def calculate_services ( source ) : with open ( source , 'r' ) as thrift : namespaces = dict ( ) types = defaultdict ( set ) for line in thrift : match = NAMESPACE_PARSER . match ( line ) if match : lang = match . group ( 1 ) namespace = match . group ( 2 ) namespaces [ lang ] = namespace else : match = TYPE_PARSER . match ( line ) if match : typename = match . group ( 1 ) name = match . group ( 2 ) types [ typename ] . add ( name ) return types [ 'service' ]
short_docstring: Calculates the services generated for the given thrift IDL source.
short_docstring_tokens: Calculates the services generated for the given thrift IDL source .
comment: """Calculates the services generated for the given thrift IDL source.
    Returns an interable of services
    """