We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 670e9c3 commit 477ec73Copy full SHA for 477ec73
docs/source/structs.rst
@@ -161,6 +161,14 @@ at the end of the generated ``__init__`` method. It has the same semantics as th
161
This method may be useful for adding additional logic to the init (such as
162
custom validation).
163
164
+.. important::
165
+
166
+ ``__post_init__`` will *not* be called when using any of
167
168
+ - :func:`msgspec.structs.replace`,
169
+ - :func:`copy.replace`,
170
+ - :func:`copy.copy`,
171
172
In addition to in ``__init__``, the ``__post_init__`` hook is also called when:
173
174
- Decoding into a struct type (e.g. ``msgspec.json.decode(..., type=MyStruct)``)
0 commit comments