Project

General

Profile

« Previous | Next » 

Revision 794

xml_func.py: Use conv_items(str, ...) in XML funcs that require strings, but don't otherwise use conv_items()

View differences:

lib/xml_func.py
40 40
    return str(sum_/count)
41 41

  
42 42
def date(items):
43
    items = list(items) # Get all items *once* from iter
43
    items = conv_items(str, items) # Get items *once* from iter and check types
44 44
    try: str_ = dict(items)['date']
45 45
    except KeyError:
46 46
        items = dict(filter(lambda (k, v): v != 0, conv_items(int, items)))

Also available in: Unified diff