From 11009af16ecab85f3d688000d46fe3c16b00fc39 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Fri, 18 Jan 2019 18:01:43 +0600 Subject: [PATCH] Adds a note about Python code exceptions --- specs/core/0_beacon-chain.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 002e53f97..2ecc76b94 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -135,7 +135,9 @@ The primary source of load on the beacon chain is "attestations". Attestations a ## Notation -Unless otherwise indicated, code appearing in `this style` is to be interpreted as an algorithm defined in Python. Implementations may implement such algorithms using any code and programming language desired as long as the behavior is identical to that of the algorithm provided. +Unless otherwise indicated, code appearing in `this style` is to be interpreted as an algorithm defined in Python. Hence, exceptional cases that are not explicitly handled by a logic in `this style` blocks are propagated to Python exception mechanism. In particular, out of range index access would turned into `IndexError: list index out of range` exception being thrown. + +Implementations may implement such algorithms using any code and programming language desired as long as the behavior is identical to that of the algorithm provided. ## Terminology