Supported Python Statements
Your statements and expressions are going to be statically typechecked, so that your supplied type hints correspond to the operations you are performing.
Dictionary updates
Updating or creating a dictionary entry is performed using a standard indexed assignment statements (note that type hint is still necessary). To remove a key from a dictionary, the standard del
statement is also supported:
Branching
The if/elif/else
branching statements can be used to control the execution flow. The if
test must have the boolean type. Empty return
statements can be used to break out of the receive
methods:
Validation methods must return boolean values and standalone functions must return the values of the provided type hint:
Assignment Statements
Assignment statements are the most basic Python tatements allowed in method and function declarations. You can either assign to a self
attribute (which must be initialized in the __init__
constructor method), or some local variable:
Each assignment statement must provide the type of the assignment target. Since augmented assignments cannot be type- annotated, they are not allowed.