@staticmethod
    def _handle_argument(val, argtype, name):
        if argtype:
            try:
                return argtype(val)
            except (__HOLE__, ValueError):
                ex = sys.exc_info()[1]  # compat
                raise WrongArgumentType("Argument of %s expected to be %r, not %r:\n    %r" % (
                    name, argtype, val, ex))
        else:
            return NotImplemented
dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/cli/application.py/Application._handle_argument