title: ArgParse Python Module: Change default argument value for inherted argument
body: <p>I have a bunch of Python scripts that use common code for reading input and writing output files of different types. </p>
  
  <p>These are chemical structure files. Some example file types would be .smi or .sdf. </p>
  
  <p>By default, I want some of these scripts to output data in the "smi" file format, and others to output data in the "sdf" format. </p>
  
  <p>Is it possible to override the default value of an argument inherited from a parent parser?</p>
  
  <p>For example...</p>
  
  <pre><code># Inherited code
  filesParser = argparse.ArgumentParser(add_help=False)
  filesParser.add_argument('-o', dest='outformat', default="smi")
  
  # Script code
  parser = argparse.ArgumentParser(description='inherts from filesParser', parents=[filesParser])
  parser.add_argument('--foo')
  
  # Something like...
  # parser.outformat.default = "sdf"
  
  args = parser.parse_args()
  </code></pre>
  
  <p>First post so hope my etiquette is OK. </p>
  
  <p>Many thanks,
  Dave</p>