From 25ef2553c790add9b66f0c5d5eb67bfe0ddc4839 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 1 Mar 2019 12:02:29 +0100 Subject: [PATCH] Update simple-serialize.md --- specs/simple-serialize.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/specs/simple-serialize.md b/specs/simple-serialize.md index faba9e762..31839b27e 100644 --- a/specs/simple-serialize.md +++ b/specs/simple-serialize.md @@ -12,7 +12,8 @@ This is a **work in progress** describing typing, serialization and Merkleizatio - [Serialization](#serialization) - [`uintN`](#uintn) - [`bool`](#bool) - - [Containers, tuples, lists](#containers-tuples-lists) + - [Tuples](#lists) + - [Containers, lists](#containers-lists) - [Deserialization](#deserialization) - [Merkleization](#merkleization) - [Self-signed containers](#self-signed-containers) @@ -68,7 +69,13 @@ assert value in (True, False) return b'\x01' if value is True else b'\x00' ``` -### Containers, tuples, lists +### Tuples + +```python +return ''.join([serialize(element) for element in value]) +``` + +### Containers, lists ```python serialized_bytes = ''.join([serialize(element) for element in value])