class Parser1:

    def __init__(self, desc):
        self.parser = argparse.ArgumentParser(description=desc)
self.actions = []

def milestone(self, help_='milestone for latest release.', default=None):
    action = self.parser.add_argument('-m', '--milestone', help=help_,
        default=default)
self.actions.append(action)
return self

def parse(self):
    args = self.parser.parse_args()
for a in self.actions:
    if getattr(args, a.dest) == a.default:
        print('Please specify', a.dest)
values = input('>')
setattr(args, a.dest, values)
return args
print(Parser1('desc').milestone(default='PROMPT').parse())
Cause Python's argparse to execute action for default