Commit 79a3b13
Implement most of the string methods. (RustPython#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()1 parent f325ef1 commit 79a3b13
4 files changed
Lines changed: 562 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| |||
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
43 | 68 | | |
44 | 69 | | |
45 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
0 commit comments