• An example
  • The Viper decorator
  • @micropython.viper vs. @micropython.native decorator
  • The Viper data types: int, uint, bool, ptr32, ptr16 and ptr8
  • What to remember about Viper data types
  • The Viper int data type
  • Viper integer constants
  • Create Viper int by assigning a value
  • Create Viper int with a type hint on the function parameter
  • Making sure a Viper int is a Viper int
  • Differences of Viper int and builtins.int data types
  • int() casting
  • The Viper uint data type
  • The viper bool data type
  • The Viper ptr32, ptr16 and ptr8 data types
  • Declaration of pointer variables with type hints on function argument
  • Declaration of pointer variables with ptr32(), ptr16() and ptr8()
  • Viper pointers and arrays
  • Values of indexed pointers
  • Assigning to a indexed pointer
  • Relationship with mem8, mem16 and mem32 functions
  • Viper pointer casting and pointer arithmetic
  • Viper function parameters and return values
  • Viper function parameters
  • Passing a Viper variable to a called function
  • Viper function return values
  • Other topics
  • Range vs. while
  • Global variables
  • Example of nonlocal and closure with Viper functions
  • Viper in classes
  • Slices
  • async and generators
  • Type hints in the body of a Viper function
  • Test if a variable is of type Viper int
  • Source code of the Viper code emitter
  • Some error messages
  • ViperTypeError: can't do binary op between 'int' and 'object'
  • ViperTypeError: local 'x' has type 'int' but source is 'object'
  • TypeError: can't convert str to int
  • Some interesting links