title: Is it possible to have 2 actions on argparse argument?
body: <p>like the title says, I have a parser that has to do 2 things on an argument,</p>
  
  <ol>
  <li>it has to append a const to a list (a list that gives the program all the functions it has to process)</li>
  <li>it has to add the value after this argument to a variable, so it can be used later</li>
  </ol>
  
  <p>some code of the parser (will fail, as defining 2 times '-copy' wont work:</p>
  
  <pre class="lang-py prettyprint-override"><code>parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description="""some help text""")
  # ... more arguments, but not a problem
  parser.add_argument('-ls','--list',action='append_const', dest='tasks',const=ls, help='outputs the filelocation if match was found')
  parser.add_argument('-copy', action='append_const', dest='tasks',const=copy, help='copies the file to the given location if a match was found')
  parser.add_argument('-copy', dest='copyLocation', help='outputs the filelocation if match was found')
  </code></pre>
  
  <p>anyone an idea of how to work around this and make the -copy argument do both a store and a append_const?</p>
  
  <p>I know I could just 'postprocess' the args and check if there is a -copy in it, and if so then add the function copy to the list tasks. But this seams like a workaround, so I hoped there is a better way of doing things without postprocessing the arguments.</p>