Fix up example

This commit is contained in:
Luke Murphy 2020-08-05 08:00:22 +02:00
parent 2ea20165f4
commit 9f70ecf4be
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -21,10 +21,10 @@ smc_a = SimpleMessageChannel()
smc_b = SimpleMessageChannel()
payload = smc_b.send(0, 1, b"foo")
print(f"sent: {payload})
print(f"sent: {payload}")
for idx in range(0, len(payload)):
smc_a.recv(payload[idx, idx + 1])
smc_a.recv(payload[idx : idx + 1])
for msg in smc_a.messages:
print(f"received: {msg}")
@ -33,6 +33,6 @@ for msg in smc_a.messages:
Output:
```sh
sent: ...
received: (0, 1, b"foo")
sent: b'\x04\x01foo'
received: (0, 1, b'foo')
```