Commit Graph

961 Commits

Author SHA1 Message Date
Windel Bouwman
babb8ed2f0 Deleted comparison based on objectkind 2018-10-24 12:02:16 +02:00
Windel Bouwman
c742909d51 First working implementation of generators. 2018-10-24 10:54:48 +02:00
Windel Bouwman
89a280e5b2 Move a lot of functions from vm to frame for generator support 2018-10-23 23:34:29 +02:00
Windel Bouwman
acefe3841e Add initial generator builtin type 2018-10-23 21:27:40 +02:00
Windel Bouwman
104bc56bc1 Add hash builtin function. 2018-10-21 23:33:06 +02:00
Windel Bouwman
525807c319 Add __getitem__ on list, tuple and str 2018-10-21 21:09:38 +02:00
Windel Bouwman
f59f8a9567 Add support for *args and **kwargs in functions. 2018-10-21 20:48:08 +02:00
Windel Bouwman
ae768c7fe6 Add parsing for star arg parameters. 2018-10-20 11:47:23 +02:00
Windel Bouwman
7e45d0b8b4 Add del statement 2018-10-19 18:41:44 +02:00
Akshay Verma
fad493c79f Added capitalize method to string 2018-10-18 16:14:35 +02:00
Windel Bouwman
5707548436 Add set.add method 2018-10-17 21:08:46 +02:00
Éloi Rivard
b18156ac21 Added set object membership test 2018-10-17 19:39:17 +02:00
Éloi Rivard
2f29798ced Fixed __contains__ comparison on lists, tuples and iter objects 2018-10-17 19:26:24 +02:00
Windel Bouwman
a450c0e3da Add builtin type set 2018-10-17 17:14:46 +02:00
Éloi Rivard
e415ee1fbf Basic membership implementation 2018-10-17 13:57:38 +02:00
Windel Bouwman
133d72fcb1 Add tokenize module. Change call_method to take a reference to a PyObjectRef. Add new method to list class. 2018-10-14 15:21:48 +02:00
Windel Bouwman
5e27cc45b0 Initial struct module 2018-10-13 22:04:49 +02:00
Windel Bouwman
bc60969091 Update formatting and readme file 2018-10-13 09:44:42 +02: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
Daniel Watkins
d438ddcdfd Merge pull request #144 from rmliddle/added_builtins
Added builtins
2018-09-12 22:01:37 -04:00
rmliddle
1e1e9d2669 divmod builtin 2018-09-13 08:00:52 +10: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
rmliddle
256d518c4a floordiv, float mod 2018-09-11 21:56:08 +10:00
rmliddle
43489bed4c added abs builtin, __abs__ attributes on float and int objects 2018-09-10 23:01:07 +10: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
rmliddle
abba4ae9cc implemented pow builtin 2018-09-09 00:05:13 +10:00
Windel Bouwman
64b04d0a91 Move get_attributes to objtype file 2018-09-03 21:39:16 +02:00
Windel Bouwman
9fa10c7c1a Merge with master 2018-09-03 21:30:05 +02:00
Daniel Watkins
10f0ef33d6 Implement no-args int() construction 2018-09-02 17:00:35 -04:00
Windel Bouwman
947c17eb84 Improve int type error 2018-09-02 21:49:56 +02:00
Windel Bouwman
a9bc374fc0 Implement dir on object 2018-09-02 20:44:46 +02:00
Windel Bouwman
1a2a4adcef Lets delete some clones 2018-09-02 19:41:37 +02:00
Windel Bouwman
3bf48b1c2a Merge branch 'master' of https://github.com/RustPython/RustPython into objtyp 2018-09-02 19:34:58 +02:00
Windel Bouwman
f7cae1e9db Change signature of isinstance to take a reference to a python reference 2018-09-02 19:34:54 +02:00
Adam Kelly
8816e5d362 Implement more complete version of str_repr. 2018-09-02 13:05:03 +01:00
Adam Kelly
7c3cd319b2 objbytes: str -> repr 2018-09-02 12:09:57 +01:00
Adam Kelly
7277e63a53 Add vm.to_repr and call for formatting list/tuple/dict elements. 2018-09-02 12:09:57 +01:00
Adam Kelly
70f6d73001 Add __repr__ to objstr. 2018-09-02 12:09:57 +01:00
Adam Kelly
c8d8528bff object.__str__ delegates to __repr__. 2018-09-02 12:09:57 +01:00
Adam Kelly
76344e5023 Add object.__init__ 2018-09-02 10:57:30 +01:00
Adam Kelly
e68dbf6705 Ints aren't mutable, change int.__init__ to int.__new__ 2018-09-02 10:50:03 +01:00
Adam Kelly
dd24727c0e Use __eq__ methods inequality too. 2018-09-01 22:29:20 +01:00
Adam Kelly
8d8816ce04 Merge branch 'master' into equality 2018-09-01 20:46:22 +01:00
Adam Kelly
8780d58857 Define __eq__ for lists and tuples. 2018-09-01 17:10:00 +01:00
Adam Kelly
28f8cdbda9 Define __eq__ for basic types. 2018-09-01 17:09:20 +01:00
Adam Kelly
8c28e1e051 Call method needs &str not &String. 2018-09-01 15:02:39 +01:00