Revision 1320
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/xpath.py | ||
---|---|---|
298 | 298 |
|
299 | 299 |
return next |
300 | 300 |
|
301 |
def get_1(*args, **kw_args): |
|
302 |
'''Runs get() and returns the first result''' |
|
303 |
return util.list_get(get(*args, **kw_args), 0) |
|
304 |
|
|
301 | 305 |
def put_obj(root, xpath, id_, has_types, value=None): |
302 | 306 |
if util.is_str(xpath): xpath = parse(xpath) |
303 | 307 |
|
Also available in: Unified diff
xpath.py: Added get_1()