Move assoc to deprecated section

This commit is contained in:
Hynek Schlawack 2017-02-03 11:03:16 +01:00
parent 0d3cf3f624
commit 735ba4121b
1 changed files with 2 additions and 19 deletions

View File

@ -201,25 +201,6 @@ See :ref:`asdict` for examples.
>>> i1 == i2 >>> i1 == i2
False False
.. autofunction:: assoc
For example:
.. doctest::
>>> @attr.s
... class C(object):
... x = attr.ib()
... y = attr.ib()
>>> i1 = C(1, 2)
>>> i1
C(x=1, y=2)
>>> i2 = attr.assoc(i1, y=3)
>>> i2
C(x=1, y=3)
>>> i1 == i2
False
.. autofunction:: validate .. autofunction:: validate
For example: For example:
@ -300,3 +281,5 @@ Deprecated APIs
The serious business aliases used to be called ``attr.attributes`` and ``attr.attr``. The serious business aliases used to be called ``attr.attributes`` and ``attr.attr``.
There are no plans to remove them but they shouldn't be used in new code. There are no plans to remove them but they shouldn't be used in new code.
.. autofunction:: assoc