Commit Graph

1690 Commits

Author SHA1 Message Date
Windel Bouwman
9869ef7db5 Add delattr builtin method. 2018-11-02 21:01:24 +01:00
Windel Bouwman
b7a0b0f2f3 Removal of ToRust trait to prevent incorrect str representation 2018-11-02 20:27:05 +01:00
Windel Bouwman
4be2f24708 Merge pull request #184 from RustPython/metaclasses
WIP - Specify metaclass and create class with correct type.
2018-11-02 19:32:03 +01:00
Adam Kelly
aa10e9b589 Fix traceback printing bug. 2018-11-02 17:39:40 +00:00
Adam Kelly
f587221401 Separate get_method (magic methods) and get_attribute (full attribute access). 2018-11-02 17:16:46 +00:00
Adam Kelly
ac861a4629 Special cases for new, and type error on bad call. 2018-11-02 17:16:46 +00:00
Adam Kelly
dce628dfad Simple metaclass snippet demoing call and new. 2018-11-02 17:16:46 +00:00
rmliddle
ad0f8dd674 Readme changes for compliation with wasm-pack 2018-11-02 18:17:06 +11:00
Adam Kelly
aa955c9ca3 Support **kwargs to __call__. 2018-11-01 19:57:13 +00:00
Adam Kelly
5c7b0da2f1 Magic methods aren't looked up via getattribute. 2018-11-01 19:57:13 +00:00
Adam Kelly
3e07c19ec4 Implement object.__getattribute__. 2018-11-01 19:57:13 +00:00
Adam Kelly
c8e842eaab Specify metaclass and create class with correct type. 2018-11-01 19:55:23 +00:00
Windel Bouwman
89cfdbe3dd Use __setitem__ to store elements in list. Also refactor get_elements to return a reference to the elements, not a copy. 2018-10-31 23:18:26 +01:00
Windel Bouwman
2aa763867c Try __sub__, next __rsub__, next give up 2018-10-31 22:02:23 +01:00
Windel Bouwman
bddaf3e77e Implement while-else and for-else. Call __neg__ and __invert__ methods on unary operation. 2018-10-31 21:50:00 +01:00
Windel Bouwman
cb4d66bd48 Added bit length method on int type. 2018-10-30 22:08:10 +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
Bojan
0e4d3677d9 Fixed formatting 2018-10-28 23:08:14 +01:00
Windel Bouwman
5053d6d167 Add bytes literal support. 2018-10-28 21:15:46 +01:00
Bojan
01407194de Added default __and__
For all objects without defined __and__ this should be a default error
2018-10-28 21:08:28 +01:00
Windel Bouwman
7e1067168b Add list.extend method 2018-10-28 20:16:24 +01:00
Windel Bouwman
e6fd9fb0a0 Add double star arguments in function calls 2018-10-28 20:05:05 +01:00
Windel Bouwman
3f6c716b37 Implement star expand argument in function call. 2018-10-28 19:16:21 +01:00
Windel Bouwman
851d263878 Merge branch 'master' of https://github.com/RustPython/RustPython 2018-10-28 14:16:15 +01:00
Windel Bouwman
4187a6ee39 Add support for star expanded argument in list and tuple constructions. 2018-10-28 14:16:11 +01:00
Windel Bouwman
abe6abadf3 Merge pull request #181 from BojanKogoj/bojan/objfloat-__ge__
Added __ge__ to float
2018-10-28 13:35:26 +01:00
Windel Bouwman
6190914540 Merge pull request #176 from cauebs/master
Implement `bin` and `hex` builtin functions
2018-10-28 13:33:24 +01:00
Windel Bouwman
1974cbe691 Refactor frame to be able to handle errors more easily. 2018-10-28 11:51:29 +01:00
rmliddle
27b5796b92 formatting fixes 2018-10-28 13:30:18 +11:00
rmliddle
958ee94bdc HTML update 2018-10-28 13:25:36 +11:00
rmliddle
72d53fe807 move to wasm-bindgen + supporting application 2018-10-28 13:23:00 +11:00
Bojan
59417ea451 Added __ge__ to float 2018-10-28 00:36:51 +02:00
Cauê Baasch de Souza
1de31053e9 Fix tests for bin and hex builtin functions 2018-10-27 19:33:04 -03:00
Windel Bouwman
afea338c08 Merge branch 'master' of https://github.com/RustPython/RustPython 2018-10-28 00:26:30 +02:00
Windel Bouwman
1f30693718 Allow unpack in assignment of list as well as trailing comma for 1 sized tuples 2018-10-28 00:26:24 +02:00
Windel Bouwman
e0a394d622 Merge pull request #180 from BojanKogoj/bojan/objfloat-__gt__
Added __gt__ to float
2018-10-27 23:26:17 +02:00
Bojan
ec006ae6b9 Added __gt__ to float 2018-10-27 22:45:22 +02:00
Windel Bouwman
57dbfd16af Merge pull request #177 from BojanKogoj/bojan/objfloat-__lt__
Added __lt__ for float
2018-10-27 22:23:06 +02:00
Bojan
a2889f10e9 Added some tests 2018-10-27 22:08:39 +02:00
Bojan
6df02536c8 Removed unused line 2018-10-27 21:03:40 +02:00
Windel Bouwman
1d854a8fbb Modify isinstance call signature to take reference to a python reference. 2018-10-27 17:58:54 +02:00
Windel Bouwman
af1f8f9f13 Merge branch 'master' of https://github.com/RustPython/RustPython 2018-10-27 17:05:44 +02:00
Windel Bouwman
a3a427c252 Add 'yield from' syntax 2018-10-27 17:05:22 +02:00
Bojan
3077d7b22c Merge branch 'master' into bojan/objfloat-__lt__ 2018-10-27 15:57:00 +02:00
Windel Bouwman
068489b1c6 Merge pull request #178 from BojanKogoj/bojan/objfloat-__le__
Added __le__ for float
2018-10-27 15:50:32 +02:00
Bojan
89e03d0436 Added __le__ for float 2018-10-27 15:13:03 +02:00
Bojan
4bb412a9ab Added __lt__ for float 2018-10-27 13:14:35 +02:00
Windel Bouwman
29ce0cf2e7 Add support for if-filters in list comprehensions. 2018-10-27 11:35:46 +02:00
Windel Bouwman
b03dd623c7 Add raw strings to lexer. Add line break continuation to lexer. 2018-10-27 10:30:11 +02:00