Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def __init__(self, name):
     Choice.__init__(self, name=name, choices=day_names)
Exemplo n.º 4
0
 def __init__(self, name):
     Choice.__init__(self, name=name, choices=month_names)
Exemplo n.º 5
0
 def __init__(self, spec):
     Choice.__init__(self, spec, {spec: True})
Exemplo n.º 6
0
 def __init__(self, spec):
     Choice.__init__(self, spec, {spec: True})