Commit Graph

21 Commits

Author SHA1 Message Date
Adrian Wielgosik
eed0b3ca45 Add float.as_integer_ratio() 2019-03-04 20:52:56 +01:00
Windel Bouwman
f2e60b24e1 Add initial platform module. 2019-02-26 21:42:38 +01:00
ZapAnton
f1654cb890 Migrated the project to the Rust 2018 edition 2019-02-14 12:02:32 +03:00
Joey Hain
38c0ea06e5 Support float(<str>) and float(<bytes>) 2019-02-11 19:40:55 -08:00
ben
5b637385ea Fixed #191, fixes recursive repr() for the standard collections 2019-02-10 13:22:03 +13:00
Joey Hain
b0a2f6f87d Add range.index 2019-02-05 13:34:54 -08:00
holygits
33a3ec8832 Handle unicode string slicing with graphemes 2019-02-04 15:40:30 +13:00
AgentMacklin
79a3b13252 Implement most of the string methods. (#239)
* implemented more functions

* backup

* Improve demo site

* Formatting; move the `+ '\n'` hack to eval().

* Rename run_code() to run_from_textbox()

* Switch to using json.dumps for py_to_js()

* Clarify names of wasm builtins

* Remove dependency on num_bigint

* Allow injecting JS variables into python with eval_py()

eval_py(`return js_vars["a"]`, { a: 9 }) == 9

* dict() now should work properly

e.g.
``` dict(a=2, b=3) == {"a": 2, "b": 3} ```

* Add documentation for eval_py() and update error message handling

Also, switch from iterating over the values of js_injections and
serializing each of them individually to asserting it's an object and
then just stringifying the whole thing.

* Finish revamping `dict_new()`

* Add 'from x import *' syntax.

This is a separate opcode in CPython so I added it as such here.

* Add test for dicts

* added functions

* ran rustfmt and fixed isidentifier

* fixed zfill and make_title

* python3.6 doesn't contain isascii()
2018-12-27 20:22:04 +01:00
Windel Bouwman
f227ce0498 Add random module 2018-11-25 23:20:10 +01:00
yodalee
04548db1e0 add implementation of special math function
function include: erf, erfc, gamma, lgamma
use package statrs' implementation
2018-11-25 20:10:34 +08:00
Windel Bouwman
a6f64eefee Change int __pow__ to use bigint pow. 2018-11-03 10:30:17 +01:00
Windel Bouwman
f6cced5d65 Change integer type into bigint 2018-10-30 21:01:31 +01:00
Windel Bouwman
1e3b45ee0d Add complex basic type 2018-10-29 21:55:58 +01:00
Windel Bouwman
bccb6f3bf5 Add draft re module 2018-10-14 10:59:00 +02:00
Windel Bouwman
5e27cc45b0 Initial struct module 2018-10-13 22:04:49 +02:00
Daniel Watkins
2cecd362fe Add support for defaults to bytecode, compiler and VM 2018-08-29 08:58:20 -04:00
Daniel Watkins
7a80c04725 Basic json module implementation in rust 2018-08-26 15:10:39 -04:00
Windel Bouwman
bbc19305f8 Reduce dependencies of vm and parser crates 2018-07-18 10:22:00 +02:00
Windel Bouwman
3349e24aad Early import mechanics 2018-07-11 23:33:59 +02:00
Windel Bouwman
3f98e3c64a Reverse dependency between vm and cpython bytecode adapter 2018-07-07 23:19:06 +02:00
Windel Bouwman
377795dbec Shuffle files in proper places 2018-07-07 17:14:45 +02:00