Commit Graph

9 Commits

Author SHA1 Message Date
Jean-Christophe Filliatre
08712c15ac micro-Python: added support for built-in function pow 2021-10-29 15:57:14 +02:00
paulpatault
2cc29e8963 Micro Python : syntax improvements & added functions
- added break and continue
- added range with one, two or three argument(s)
- added slice (`list[i1:i2]`)
- added negative index (`list[n], with -len(list) ≤ n < len(list)`)
- added lists methods:
  - `list.append(n)`
  - `list.pop()`
  - `list.clear()`
  - `list.sort()`
  - `list.reverse()`
- added `is_permutation(list1, list2)` predicate
- added assignment operators `+=`, `-=`, `*=`, `//=`, `%=`
- functions can now return `bool` and `list`
2021-06-24 11:44:07 +02:00
Jean-Christophe Filliatre
6e9d7f18b8 Python: fixed library 2021-05-31 16:51:29 +02:00
Jean-Christophe Filliatre
e691da5307 doc Python 2020-02-13 17:35:52 +01:00
Sylvain
cb1e8f28c6 external python printer/parser: div -> // and mod -> % 2019-09-25 17:23:49 +02:00
Jean-Christophe Filliatre
4276396564 fixed Python plug-in standard library 2019-06-28 11:40:48 +02:00
Andrei Paskevich
eae547d95f stdlib, examples: remove redundant "import" 2018-06-15 16:45:58 +02:00
Andrei Paskevich
7b0929a761 WhyML: "use/clone T" imports by default (in absence of "as")
For the previous behaviour (no import), write "use/clone T as T".

This shortens the most used "use/clone import" to simply "use/clone".
2018-06-15 16:45:58 +02:00
Guillaume Melquiond
efb51e7d43 Merge theories and modules into stdlib (fix issue #62). 2017-12-15 15:34:35 +01:00