Project

General

Profile

« Previous | Next » 

Revision 83

Changed for loops to use enumerate() where the index is also needed

View differences:

xpath.py
120 120
    # into separate nodes
121 121
    if parent == None: parent = doc.documentElement
122 122
    if last_only == None: last_only = create
123
    elem_idx = 0
124
    for elem in xpath:
123
    for elem_idx, elem in enumerate(xpath):
125 124
        # Find possible matches
126 125
        children = []
127 126
        if elem.is_attr:
......
184 183
            return get(doc, xpath, create, last_only)
185 184
        
186 185
        parent = node
187
        elem_idx += 1
188 186
    return parent
189 187

  
190 188
def put_obj(doc, xpath, id_, has_types, value):

Also available in: Unified diff