Project

General

Profile

« Previous | Next » 

Revision 2010

xpath.py: Added is_xpath()

View differences:

lib/xpath.py
47 47

  
48 48
##### Paths
49 49

  
50
def is_xpath(value):
51
    return isinstance(value, list) and (len(value) == 0
52
        or isinstance(value[0], XpathElem))
53

  
50 54
def path_is_empty(path): return path == [] or path == [empty_elem]
51 55

  
52 56
def is_positive(path): return path[0].is_positive

Also available in: Unified diff