Changeset 106

Show
Ignore:
Timestamp:
11/01/07 10:36:55 (14 months ago)
Author:
verbosus
Message:

Automatic Text: replaced list of string digits with neat list comprehension

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • hacks/trunk/automatic_text.py

    r105 r106  
    190190 
    191191def map_digit_to_name(digit): 
    192     if digit in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']: 
     192    if digit in [str(x) for x in string.digits]: 
    193193        return DIGITS[int(digit)] 
    194194    else: