def load(self, filename):

    def multiline(pf):
      '''Read and join multiple lines with trailing backslash.'''
      joined_lines = []
      for line in pf:
        line = line.strip()
        if len(line) == 0 or line[0] == '#': # ignore comments
          continue
        if line[-1] == '\\': # join next line?
          joined_lines.append(line[0:-1])
        else:
          yield ''.join(joined_lines) + line
          joined_lines = []

    with open(filename, 'r') as pf:
      for line in multiline(pf):
        key, value = self.parse(line)
        if key == '@import':
          self.load(os.path.join(os.path.dirname(filename), value))
    return self
Whether we are at the top level in the class.
dataset/ETHPy150Open bloomreach/briefly/src/briefly/properties.py/Properties.load--crossover with--dataset/ETHPy150Open google/closure-linter/closure_linter/statetracker.py/StateTracker.InTopLevel