Fix API docs for validator

This commit is contained in:
Hynek Schlawack 2015-02-09 13:38:10 +01:00
parent 1abfb5dad8
commit fa88c0915e
1 changed files with 3 additions and 2 deletions

View File

@ -55,8 +55,9 @@ def attr(default=NOTHING, validator=None, no_repr=False, no_cmp=False,
:type default: Any value. :type default: Any value.
:param validator: :func:`callable` that is called by ``attrs``-generated :param validator: :func:`callable` that is called by ``attrs``-generated
``__init__`` methods. They receive the :class:`Attribute` as the first ``__init__`` methods after the instance has been initialized. They
parameter and the passed value as the second parameter. receive the initialized instance, the :class:`Attribute`, and the
passed value.
The return value is *not* inspected so the validator has to throw an The return value is *not* inspected so the validator has to throw an
exception itself. exception itself.