From 6d531f05756272e13cb3c3fa22b45e0c4b94019b Mon Sep 17 00:00:00 2001 From: rmelick Date: Tue, 12 Jul 2022 09:19:54 -0700 Subject: [PATCH] Update documentation about from_bytes to use context manager. #287 --- docs/quickstart.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 810b9b2..b5d5632 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -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::