Comment about `Struct.typecast()` conflict with frozen instances

pre_overruns_ctxcancelled
Tyler Goodlet 2023-03-21 14:08:54 -04:00
parent 0866d46484
commit da7371988a
1 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,8 @@ class Struct(
msgspec.msgpack.Encoder().encode(self)
)
# NOTE XXX: this won't work on frozen types!
# use ``.copy()`` above in such cases.
def typecast(
self,
# fields: Optional[list[str]] = None,