title: python resolving env variables and extra interpolation at the same time
body: <p>Using the configparser library, I'm trying to have both interpolation as well as env variables resolving, but it is not happening.</p>
  
  <pre><code>import os, configparser
  
  class EnvInterpolation(configparser.BasicInterpolation):
      """Interpolation which expands environment variables in values."""
  
      def before_get(self, parser, section, option, value, defaults):
          return os.path.expandvars(value)
  
  cfg = """
  [Default]
  key = world
  my_path = ${PYTHONPATH}
  path2 = /user/${Default:key} 
  [Main]
  path_main = Hello.${Default:key}
  """
  
  config = configparser.ConfigParser(interpolation=EnvInterpolation())
  config.read_string(cfg)
  
  print(config['Default']['my_path'])
  print(config['Default']['path2'])
  print(config['Main']['path_main']) 
  </code></pre>
  
  <p>I get the result as </p>
  
  <pre><code>C:\install\spark\spark-2.4.0-bin-hadoop2.7\python
  /user/${Default:key}
  Hello.${Default:key}
  </code></pre>
  
  <p>whereas what I want is </p>
  
  <pre><code>C:\install\spark\spark-2.4.0-bin-hadoop2.7\python
  /user/world
  Hello.world
  </code></pre>
  
  <p>If i use the ExtendedInterpolation directly, I get below error.</p>
  
  <pre><code>InterpolationMissingOptionError: Bad value substitution: option 'my_path' in section 'Default' contains an interpolation key 'PYTHONPATH' which is not a valid option name. Raw value: '${PYTHONPATH}'
  </code></pre>