Better way to fix evolve docs

This commit is contained in:
Hynek Schlawack 2017-05-22 16:23:18 -07:00
parent b7919d0ddd
commit 8ed593b954
1 changed files with 6 additions and 6 deletions

View File

@ -193,7 +193,7 @@ See :ref:`asdict` for examples.
.. autofunction:: attr.evolve .. autofunction:: attr.evolve
For example: For example:
.. doctest:: .. doctest::
@ -210,12 +210,12 @@ For example:
>>> i1 == i2 >>> i1 == i2
False False
``evolve`` creates a new instance using ``__init__``. ``evolve`` creates a new instance using ``__init__``.
This fact has several implications: This fact has several implications:
* private attributes should be specified without the leading underscore, just like in ``__init__``. * private attributes should be specified without the leading underscore, just like in ``__init__``.
* attributes with ``init=False`` can't be set with ``evolve``. * attributes with ``init=False`` can't be set with ``evolve``.
* the usual ``__init__`` validators will validate the new values. * the usual ``__init__`` validators will validate the new values.
.. autofunction:: validate .. autofunction:: validate