Commit Graph

501 Commits

Author SHA1 Message Date
rmliddle
cb0ca5cd61 set __name__ on import 2018-10-10 22:18:19 +11:00
rmliddle
e7942264d6 added __name__ to scope 2018-10-10 22:12:30 +11:00
Windel Bouwman
d650476f85 Add additional methods to string objects 2018-09-29 10:31:59 +02:00
Windel Bouwman
2d7b0e0d4b Moved objbool into obj folder 2018-09-29 09:38:07 +02:00
Windel Bouwman
a3af930787 Merge pull request #145 from rmliddle/minor-readme-cleanup
Minor readme cleanup
2018-09-23 12:12:11 +02:00
rmliddle
0f4aeeb4cf Added license badge 2018-09-23 16:39:00 +10:00
rmliddle
4035f4da16 highlighting on code org 2018-09-23 16:31:36 +10:00
rmliddle
c9fdc68937 readme and example change 2018-09-23 16:25:48 +10:00
Windel Bouwman
dd7b4a086a Merge pull request #143 from RustPython/with
Add prototype of context manager handling during exceptions.
2018-09-19 10:36:06 +02:00
Daniel Watkins
d438ddcdfd Merge pull request #144 from rmliddle/added_builtins
Added builtins
2018-09-12 22:01:37 -04:00
rmliddle
e19c3c113b removed commented out function in builtins 2018-09-13 08:07:52 +10:00
rmliddle
1e1e9d2669 divmod builtin 2018-09-13 08:00:52 +10:00
Windel Bouwman
1110bdeb79 Add prototype of context manager handling during exceptions. 2018-09-12 21:26:26 +02:00
Windel Bouwman
e5615593bd Merge pull request #139 from RustPython/with
With statement implementation
2018-09-12 20:35:14 +02:00
Windel Bouwman
013964549b Add example with two context managers in a single with statement 2018-09-12 19:25:21 +02:00
Windel Bouwman
638af166df Process review comments 2018-09-12 19:13:34 +02:00
Windel Bouwman
7b005c75a3 Merge branch 'master' of https://github.com/RustPython/RustPython into with 2018-09-12 19:05:29 +02:00
Windel Bouwman
8a28d1f2fc Merge pull request #142 from OddBloke/clippy
Accept slices to function calls
2018-09-12 19:05:12 +02:00
rmliddle
77772abedf div_mod attribute on float and int 2018-09-12 22:56:57 +10:00
Daniel Watkins
23910f78e7 Accept slices to function calls
Instead of allocated types, per [0].

[0] https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#ptr_arg
2018-09-11 15:05:33 -04:00
Windel Bouwman
797e7f341f Merge branch 'master' of https://github.com/RustPython/RustPython into with 2018-09-11 19:21:13 +02:00
Windel Bouwman
6388891ac6 Merge pull request #141 from OddBloke/clippy
Apply some clippy lints
2018-09-11 19:20:43 +02:00
Windel Bouwman
28d58550df Merge pull request #140 from OddBloke/import
Cache imported modules in sys.modules
2018-09-11 19:19:36 +02:00
rmliddle
256d518c4a floordiv, float mod 2018-09-11 21:56:08 +10:00
Daniel Watkins
5a27e34e4c Pass label by value to VirtualMachine.jump()
Per [0], this is more efficient for usize.

[0] https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#trivially_copy_pass_by_ref
2018-09-11 00:11:03 -04:00
Daniel Watkins
5a68005388 Remove needless .ok() calls in main.rs 2018-09-11 00:11:03 -04:00
Daniel Watkins
d88917f5a2 Remove needless clone of scope in main.rs 2018-09-11 00:11:03 -04:00
Daniel Watkins
ea7f6b4d37 Pass a string slice around in main.rs
We only need to convert it to a String once we're passing it in to
compile::compile.
2018-09-11 00:11:03 -04:00
Daniel Watkins
c5e36e8530 Ignore clippy warnings in lalrpop generated code 2018-09-11 00:11:03 -04:00
Daniel Watkins
a5b6f28167 Cache imported modules in sys.modules 2018-09-10 23:40:06 -04:00
Windel Bouwman
9bf1cb3db8 First simple variant of with-statement operational. 2018-09-10 21:20:23 +02:00
Windel Bouwman
0f148e1214 Merge branch 'master' of https://github.com/RustPython/RustPython into with 2018-09-10 20:10:38 +02:00
Windel Bouwman
1eab9165bf Initial work on 'with' context manager logic 2018-09-10 20:10:31 +02:00
Windel Bouwman
803a823d51 Merge pull request #138 from RustPython/assignment
Assignment
2018-09-10 19:45:22 +02:00
rmliddle
43489bed4c added abs builtin, __abs__ attributes on float and int objects 2018-09-10 23:01:07 +10:00
cthulahoops
d443c6428b Merge pull request #136 from RustPython/objtyp
Objtyp
2018-09-09 21:35:38 +01:00
Adam Kelly
a14b776a81 Add tuple packing/unpacking assignment. (tuples only) 2018-09-09 21:19:56 +01:00
Adam Kelly
b48d77b78e Add tests to check assignment works with tuple unpacking. 2018-09-09 21:19:27 +01:00
Windel Bouwman
de9c11c7c5 Move nxt function from pyobject to objiter file. Also fix formatting issues. 2018-09-09 20:55:03 +02:00
Windel Bouwman
0acfc10a09 Merge with master branch 2018-09-09 20:36:42 +02:00
Windel Bouwman
9f06835ca0 Add built-ins next and iter 2018-09-09 20:35:48 +02:00
Windel Bouwman
903bf41a7a Merge pull request #135 from rmliddle/added_builtins
implemented pow builtin
2018-09-09 19:43:45 +02:00
rmliddle
06f3506b62 formatting fixes on builtin_pow 2018-09-09 00:34:08 +10:00
rmliddle
abba4ae9cc implemented pow builtin 2018-09-09 00:05:13 +10:00
cthulahoops
416e48b12e Merge pull request #134 from RustPython/objtyp
Initial attempt at ast builtin module
2018-09-07 09:45:23 +01:00
Windel Bouwman
da7745cf27 Fix module type 2018-09-05 14:31:06 +02:00
Windel Bouwman
ac3c18cf4a Add module type 2018-09-05 14:16:36 +02:00
Windel Bouwman
51885f29fc Added more ast to pyast transformations 2018-09-05 14:06:16 +02:00
Windel Bouwman
f914b4848f Add two asserts to the ast snippets to check attributes of ast nodes. 2018-09-05 12:36:28 +02:00
Windel Bouwman
6293117886 Initial attempt at ast builtin module 2018-09-04 21:07:57 +02:00