mirror of
https://github.com/capnproto/pycapnp.git
synced 2025-03-04 08:24:43 +01:00
Update documentation about from_bytes to use context manager. #287
This commit is contained in:
parent
e93b0452cc
commit
6d531f0575
1 changed files with 2 additions and 1 deletions
|
@ -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::
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue