summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2013-05-20 22:57:24 -0400
committerJulian Berman <Julian@GrayVines.com>2013-05-20 22:57:24 -0400
commit0f534a089c104c0e01f4e238174a6007e5739b37 (patch)
tree41a171d11d8e76a2b5c0567509c8324e8b681139
parent84aa9ef0cfc77f31c56a24c21df41fdb05184606 (diff)
downloadjsonschema-0f534a089c104c0e01f4e238174a6007e5739b37.tar.gz
Better wording.
-rw-r--r--jsonschema/validators.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/jsonschema/validators.py b/jsonschema/validators.py
index 1cb6c2e..c4424b4 100644
--- a/jsonschema/validators.py
+++ b/jsonschema/validators.py
@@ -425,23 +425,23 @@ class ErrorTree(object):
return index in self._contents
- def __getitem__(self, k):
+ def __getitem__(self, index):
"""
- Retrieve the child tree with key ``k``.
+ Retrieve the child tree one level down at the given ``index``.
- If the key is not in the instance that this tree corresponds to and is
- not known by this tree, whatever error would be raised by
+ If the index is not in the instance that this tree corresponds to and
+ is not known by this tree, whatever error would be raised by
``instance.__getitem__`` will be propagated (usually this is some
subclass of :class:`LookupError`.
"""
- if self._instance is not _unset and k not in self:
- self._instance[k]
- return self._contents[k]
+ if self._instance is not _unset and index not in self:
+ self._instance[index]
+ return self._contents[index]
- def __setitem__(self, k, v):
- self._contents[k] = v
+ def __setitem__(self, index, value):
+ self._contents[index] = value
def __iter__(self):
"""