Project

General

Profile

« Previous | Next » 

Revision 3815

format.py: Added str2int_passthru()

View differences:

lib/format.py
7 7

  
8 8
##### String parsing
9 9

  
10
def str2int_passthru(value):
11
    try: return int(value)
12
    except ValueError: return value
13

  
10 14
def clean_numeric(val):
11 15
    '''Removes embedded whitespace, e.g "1, 000".
12 16
    Fixes some OCR errors:

Also available in: Unified diff