diff --git a/README.md b/README.md index f093706..963aa67 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,32 @@ class Foo(EnvExperiment): would not be kept across kernel calls, and that is a potential source of confusion. +## Built-in Types +* Primitive types include: + * `bool` + * `int32` + * `int64` + * `float` + * `str` (note: fixed length, provide builtin methods?) + * `bytes` +* Collections include: + * `list`: homogeneous (elements must be of the same type) fixed-size (no + append) list. + * `tuple`: inhomogeneous fixed-size list, only pattern + matching (e.g. `a, b, c = (1, True, 1.2)`) and constant indexing + is supported: + ``` + t = (1, True) + # OK + a, b = t + # OK + a = t[0] + # Not OK + i = 0 + a = t[i] + ``` + * `range` (over `int32`, `int64`, `float`) + ## Generics We use [type variable](https://docs.python.org/3/library/typing.html#typing.TypeVar) for denoting generics.