Slight tidy in how immutability works docs (#419)

This commit is contained in:
Kyle Altendorf 2018-08-02 07:37:23 -04:00 committed by Hynek Schlawack
parent d45b4c3514
commit 35a3f28400
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ Immutability
In order to give you immutability, ``attrs`` will attach a ``__setattr__`` method to your class that raises a :exc:`attr.exceptions.FrozenInstanceError` whenever anyone tries to set an attribute. In order to give you immutability, ``attrs`` will attach a ``__setattr__`` method to your class that raises a :exc:`attr.exceptions.FrozenInstanceError` whenever anyone tries to set an attribute.
Depending on whether of not a class is a dict class or a slots class, ``attrs`` uses a different technique to circumvent that limitation in the ``__init__`` method. Depending on whether a class is a dict class or a slots class, ``attrs`` uses a different technique to circumvent that limitation in the ``__init__`` method.
Once constructed, frozen instances don't differ in any way from regular ones except that you cannot change its attributes. Once constructed, frozen instances don't differ in any way from regular ones except that you cannot change its attributes.