'store parms in private vars for use in add_argument'

def __init__(self, *names, **attrs):

    self._attrs = attrs
    self._short_opts = []
    self._long_opts = []
    self.dest = attrs.get('dest')
    if ('%default' in (attrs.get('help') or '')):
        warnings.warn('pytest    now    uses    argparse.    "%default"    should    be    changed    to    "%(default)s"    ', DeprecationWarning, stacklevel=3)
    try:
        typ = attrs['type']
    except KeyError:
        pass
    else:
        if isinstance(typ, py.builtin._basestring):
            if (typ == 'choice'):
                warnings.warn(('type    argument    to    addoption()    is    a    string    %r.    For    parsearg    this    is    optional    and    when    supplied    should    be    a    type.    (options:    %s)' % (typ, names)), DeprecationWarning, stacklevel=3)
                attrs['type'] = type(attrs['choices'][0])
            else:
                warnings.warn(('type    argument    to    addoption()    is    a    string    %r.    For    parsearg    this    should    be    a    type.    (options:    %s)' % (typ, names)), DeprecationWarning, stacklevel=3)
                attrs['type'] = Argument._typ_map[typ]
            self.type = attrs['type']
        else:
            self.type = typ
    try:
        self.default = attrs['default']
    except KeyError:
        pass
    self._set_opt_strings(names)
    if (not self.dest):
        if self._long_opts:
            self.dest = self._long_opts[0][2:].replace('-', '_')
        else:
            try:
                self.dest = self._short_opts[0][1:]
            except IndexError:
                raise ArgumentError('need    a    long    or    short    option', self)
