def __init__(self): choices = { "(last | past) <day>": "last day", "(next | this) <day>": "next day", "last week <day>": "last week", "next week <day>": "next week", } extras = [Day("day")] Choice.__init__(self, name=None, choices=choices, extras=extras)
def __init__(self): choices = { "<n> days ago": -1, "yesterday": -1, "today": 0, "tomorrow": +1, "in <n> days": +1, } extras = [IntegerRef("n", 1, 100)] Choice.__init__(self, name=None, choices=choices, extras=extras)
def __init__(self, name): Choice.__init__(self, name=name, choices=day_names)
def __init__(self, name): Choice.__init__(self, name=name, choices=month_names)
def __init__(self, spec): Choice.__init__(self, spec, {spec: True})