Merge pull request #295 from rmelick-muon/from-bytes-context-manager

Update documentation about from_bytes to use context manager. #287
This commit is contained in:
Jacob Alexander 2022-07-12 09:53:48 -07:00 committed by GitHub
commit a6f4ece776
Failed to generate hash of commit

View file

@ -298,7 +298,8 @@ There is serialization to a byte string available::
And a corresponding from_bytes function::
alice = addressbook_capnp.Person.from_bytes(encoded_message)
with addressbook_capnp.Person.from_bytes(encoded_message) as alice:
# something with alice
There are also packed versions::