From fa88c0915e21d4f7b1fd4e18a97a5d0317fd3457 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 9 Feb 2015 13:38:10 +0100 Subject: [PATCH] Fix API docs for validator --- attr/_make.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/attr/_make.py b/attr/_make.py index a75333d4..1874cf97 100644 --- a/attr/_make.py +++ b/attr/_make.py @@ -55,8 +55,9 @@ def attr(default=NOTHING, validator=None, no_repr=False, no_cmp=False, :type default: Any value. :param validator: :func:`callable` that is called by ``attrs``-generated - ``__init__`` methods. They receive the :class:`Attribute` as the first - parameter and the passed value as the second parameter. + ``__init__`` methods after the instance has been initialized. They + receive the initialized instance, the :class:`Attribute`, and the + passed value. The return value is *not* inspected so the validator has to throw an exception itself.