doc: update statement in examples
This commit is contained in:
parent
5f1d588a66
commit
bd443b0191
|
@ -448,7 +448,7 @@ TypeError: ("'x' must be <type 'int'> (got '42' that is a <type 'str'>).", 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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue