Project

General

Profile

« Previous | Next » 

Revision 1473

xml_func.py: _map: empty map entry means None

View differences:

lib/xml_func.py
137 137
    except IndexError, e: raise SyntaxException(e)
138 138
    map_ = dict(items)
139 139
    closed = bool(map_.pop('_closed', False))
140
    try: return map_[value]
140
    try: value = map_[value]
141 141
    except KeyError, e:
142 142
        if closed: raise SyntaxException(e)
143 143
        else: return value
144
    return util.none_if(value, u'') # empty map entry means None
144 145
funcs['_map'] = _map
145 146

  
146 147
def _replace(items):

Also available in: Unified diff