Failed to commit Dice changes in earlier commit

This commit is contained in:
Anna Rose Wiggins 2012-03-23 15:11:24 -04:00
parent 0fc770f261
commit 07e2ef3ab2
2 changed files with 12 additions and 4 deletions

View file

@ -17,7 +17,7 @@ class Dice():
# All of the dark regex magic is contained to this function,
# lest it corrupt innocent code
@classmethod
def from_desc(cls, desc):
def from_str(cls, desc):
if not re.match(r'^\d+d\d+', desc):
raise Exception('Dice format invalid. See --help')
@ -139,7 +139,7 @@ class Dice():
def parse_input(args):
dice_list = []
for arg in args:
dice_list.append(Dice.from_desc(arg))
dice_list.append(Dice.from_str(arg))
return dice_list