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

rekt_pps
Tyler Goodlet 2023-03-21 14:08:54 -04:00
parent 589b3f4201
commit 7eb0b1d249
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,