Adds a note about Python code exceptions

This commit is contained in:
Mikhail Kalinin 2019-01-18 18:01:43 +06:00 committed by GitHub
parent a7307b9236
commit 11009af16e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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