Project

General

Profile

« Previous | Next » 

Revision 887

xpath.py: get(): Turn off last_only optimization when limit > 1

View differences:

lib/xpath.py
148 148
    '''Warning: The last_only optimization may put data that should be together
149 149
    into separate nodes'''
150 150
    if last_only == None: last_only = create
151
    if limit == None or limit > 1: last_only = False
151 152
    if type(xpath) == str: xpath = parse(xpath)
152 153
    
153 154
    if xpath == []: return [parent]

Also available in: Unified diff