parameters: (self, key)
return_statement: return val, current_section
docstring: Helper function to fetch values from owning section.
  
          Returns a 2-tuple: the value, and the section where it was found.
docstring_summary: Helper function to fetch values from owning section.
docstring_tokens: Helper function to fetch values from owning section .
function: def _fetch(self, key):
          """Helper function to fetch values from owning section.
  
          Returns a 2-tuple: the value, and the section where it was found.
          """
          # switch off interpolation before we try and fetch anything !
          save_interp = self.section.main.interpolation
          self.section.main.interpolation = False
  
          # Start at section that "owns" this InterpolationEngine
          current_section = self.section
          while True:
              # try the current section first
              val = current_section.get(key)
              if val is not None:
                  break
              # try "DEFAULT" next
              val = current_section.get('DEFAULT', {}).get(key)
              if val is not None:
                  break
              # move up to parent and try again
              # top-level's parent is itself
              if current_section.parent is current_section:
                  # reached top level, time to give up
                  break
              current_section = current_section.parent
  
          # restore interpolation to previous value before returning
          self.section.main.interpolation = save_interp
          if val is None:
              raise MissingInterpolationOption(key)
          return val, current_section
function_tokens: def _fetch ( self , key ) : # switch off interpolation before we try and fetch anything ! save_interp = self . section . main . interpolation self . section . main . interpolation = False # Start at section that "owns" this InterpolationEngine current_section = self . section while True : # try the current section first val = current_section . get ( key ) if val is not None : break # try "DEFAULT" next val = current_section . get ( 'DEFAULT' , { } ) . get ( key ) if val is not None : break # move up to parent and try again # top-level's parent is itself if current_section . parent is current_section : # reached top level, time to give up break current_section = current_section . parent # restore interpolation to previous value before returning self . section . main . interpolation = save_interp if val is None : raise MissingInterpolationOption ( key ) return val , current_section