Skip to content

Commit

Permalink
Also mention __init__ in frozen caveat
Browse files Browse the repository at this point in the history
ref #196
  • Loading branch information
hynek committed May 23, 2017
1 parent a62ba1a commit 0c8057c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/attr/_make.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ def attributes(maybe_cls=None, these=None, repr_ns=None,
``__init__`` is slightly slower with ``frozen=True``.
4. If a class is frozen, you cannot modify ``self`` in
``__attrs_post_init__``. You can circumvent that limitation by
using ``object.__setattr__(self, "attribute_name", value)``.
``__attrs_post_init__`` or a self-written ``__init__``. You can
circumvent that limitation by using
``object.__setattr__(self, "attribute_name", value)``.
.. _slots: https://docs.python.org/3.5/reference/datamodel.html#slots
Expand Down

0 comments on commit 0c8057c

Please sign in to comment.