Couldn't we do something like this? Then we don't have to clean out anything.

<pre>
    add_arg = None
    kwargs = {}
    if sys.version.startswith('2.6'):
        import optparse
        parser = optparse.OptionParser()
        add_arg = parser.add_option
        kwargs = {'action':'callback', 'callback':cb}
    else:
        import argparse
        parser = argparse.ArgumentParser()
        add_arg = parser.add_argument
        kwargs = {'action':'append', 'nargs':'*'}

    # COMMANDS
    add_arg('-A', '--append', dest='append', **kwargs)

</pre>