diff --git a/docs/examples.md b/docs/examples.md index 70a5d41b..3a422f4b 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -448,7 +448,7 @@ TypeError: ("'x' must be (got '42' that is a ).", Attri ``` Please note that if you use {func}`attr.s` (and **not** {func}`attrs.define`) to define your class, validators only run on initialization by default -- not when you set an attribute. -This behavior can be changed using the `on_setattr` argument. +This behavior can be changed using the *on_setattr* argument. Check out {ref}`validators` for more details. @@ -467,7 +467,9 @@ This can be useful for doing type-conversions on values that you don't want to f 1 ``` -Please note that converters only run on initialization. +Please note that converters only run on initialization when using the old-school {func}`attr.s` decorator. +They do run by default with {func}`attrs.define` and friends. +This behavior can be changed using the *on_setattr* argument. Check out {ref}`converters` for more details.