Commit cfbef9dc by willmcgugan

some small enhancements

parent b0f011ff
...@@ -50,8 +50,13 @@ class ObjectTree(object): ...@@ -50,8 +50,13 @@ class ObjectTree(object):
return default return default
return node return node
def __contains__(self, value): def isobject(self, path):
return value in self.root node = self._locate(path)
return type(node) is not _ObjectDict
def __contains__(self, path):
node = self._locate(path)
return node is not None
def __iter__(self): def __iter__(self):
return iter(self.root) return iter(self.root)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment