This commit is contained in:
Chris McDonough
2010-04-04 07:29:03 +00:00
parent fd0bb9b677
commit e3d34893df

View File

@@ -57,11 +57,11 @@ class Invalid(Exception):
so, a :exc:`KeyError` is raised. so, a :exc:`KeyError` is raised.
For example, if the exception upon which ``__setitem__`` is For example, if the exception upon which ``__setitem__`` is
called has a node attribute with children, and that node called has a node attribute, and that node attribute has
attribute has children that have the names ``name`` and children that have the names ``name`` and ``title``, you may
``title``, you may successfully call ``__setitem__('name', successfully call ``__setitem__('name', 'Bad name')`` or
'Bad name')`` or ``__setitem__('title', 'Bad title')``. But ``__setitem__('title', 'Bad title')``. But calling
calling ``__setitem__('wrong', 'whoops')`` will result in a ``__setitem__('wrong', 'whoops')`` will result in a
:exc:`KeyError`. :exc:`KeyError`.
This method is typically only useful if the ``node`` attribute This method is typically only useful if the ``node`` attribute