update frozen post-init example to use frozen (#1367)
This commit is contained in:
parent
1921da6eac
commit
4580a74fc9
|
@ -476,7 +476,7 @@ attrs.exceptions.FrozenInstanceError: can't set attribute
|
||||||
If you need to set attributes on a frozen class, you'll have to resort to the [same trick](how-frozen) as *attrs* and use {meth}`object.__setattr__`:
|
If you need to set attributes on a frozen class, you'll have to resort to the [same trick](how-frozen) as *attrs* and use {meth}`object.__setattr__`:
|
||||||
|
|
||||||
```{doctest}
|
```{doctest}
|
||||||
>>> @define
|
>>> @frozen
|
||||||
... class Frozen:
|
... class Frozen:
|
||||||
... x: int
|
... x: int
|
||||||
... y: int = field(init=False)
|
... y: int = field(init=False)
|
||||||
|
|
Loading…
Reference in New Issue