Joey Hain
67f8c02087
cleanup
2019-02-27 20:05:04 -08:00
Joey Hain
713edc57ee
Convert some objstring methods to new style.
2019-02-27 19:53:31 -08:00
Joey Hain
7f75e3ee8a
Significant improvements to new function definition style
...
- PyRef<T> type for accepting references to payloads.
- Args<T> type for consuming remaining positional args
(mirrors python `*args`).
- KwArgs<T> type for consuming remaining keyword args
(mirrors python `*kwargs`).
- OptArg<T> type for consuming remaining keyword args
(no python code equivalent, only possible in native functions like in cpython).
- PyIterable<T> for accepting an iterator over a sequence of Ts.
- Arity checking (but TypeError messages need work)
2019-02-27 19:53:20 -08:00
Joey Hain
3dcbc4d2aa
Fix set
2019-02-25 22:20:15 -08:00
Joey Hain
92fd12c9bd
Fix scope
2019-02-25 22:07:08 -08:00
Joey Hain
d3646925ea
Fix float()
2019-02-25 21:57:37 -08:00
Joey Hain
b28b164d75
Fix generators
2019-02-25 21:35:59 -08:00
Joey Hain
e959908a49
Fix iterator
2019-02-25 21:26:15 -08:00
Joey Hain
f10fa6db44
Remove outer RefCell from PyObjectRef
2019-02-25 21:01:37 -08:00
Windel Bouwman
027a6847e5
Merge pull request #525 from RustPython/joey/extractor-pattern
...
Use "extractor" pattern for native functions
2019-02-25 07:22:00 +01:00
Joey Hain
2919d7f520
Initial arg type checking
2019-02-23 19:27:22 -08:00
Joey Hain
fb0384d24d
Some prerequisite data types for arg checking
2019-02-23 18:16:24 -08:00
Joey Hain
c14a8302e8
Initial prototype of "extractor pattern" for native funcs
2019-02-23 18:16:02 -08:00
Adam Gutglick
f4e6e5dec8
Addred real property and is_integer function to float.
2019-02-24 04:02:24 +02:00
Windel Bouwman
3f8f0e2ff4
Merge pull request #524 from palaviv/Improve-set-5
...
Add set.{__iter__,__ior__,__iand__,__isub__,__ixor__}
2019-02-23 08:50:26 +01:00
Windel Bouwman
2d19486192
Merge pull request #520 from RustPython/py_module
...
Py module
2019-02-22 17:20:27 +01:00
Joey
2df741452b
Merge pull request #523 from AdamGS/complex_and_ints_addition
...
Complex and ints addition
2019-02-22 07:34:47 -08:00
Aviv Palivoda
fc10560308
Add set.{__ior__,__iand__,__isub__,__ixor__}
2019-02-22 16:50:40 +02:00
Aviv Palivoda
7cf25440fa
Add set.__iter__
2019-02-22 16:25:55 +02:00
Adam Gutglick
f333c75fd6
Added the ability to do addition between complex numbers and ints.
2019-02-22 08:42:44 -05:00
Adam Gutglick
38b4c10833
Added the ability to do addition between complex numbers and ints.
2019-02-21 19:28:46 -05:00
Adam Kelly
2ab90b234a
Fix unused variable warning in objint.
2019-02-21 21:05:46 +00:00
Windel Bouwman
7dd1eec936
Merge pull request #517 from palaviv/set-more-funcs
...
Add set.{pop,update,intersection_update,difference_update,symmetric_difference_update}
2019-02-21 20:53:41 +01:00
Windel Bouwman
565023f55b
Merge pull request #518 from AdamGS/add_int_attributes
...
Added real/imag attributes to int type.
2019-02-21 20:52:06 +01:00
Adam Gutglick
0c1057f079
Added real/imag attributes to int type.
2019-02-21 13:46:18 -05:00
Aviv Palivoda
21b6616e8e
Add set.symmetric_difference_update
2019-02-21 19:33:20 +02:00
Aviv Palivoda
1621d78326
Add set.difference_update
2019-02-21 19:02:05 +02:00
Aviv Palivoda
a4b814e9a7
Add set.intersection_update
2019-02-21 18:55:22 +02:00
Joey
eec76ef8e8
Don't require objtype import to use arg_check! macro
2019-02-21 08:38:02 -08:00
Aviv Palivoda
5f3664e87d
Add set.update
2019-02-21 18:34:47 +02:00
Aviv Palivoda
a89b0593da
Add set.pop
2019-02-21 18:34:47 +02:00
Adam
e2ee933256
Merge pull request #514 from RustPython/joey/crate-imports
...
Replace most relative imports with 2018-style crate imports
2019-02-21 15:29:38 +00:00
janczer
b833c08951
Add bytearray.{lower, upper}
2019-02-20 19:35:39 +01:00
Joey
df76ffe116
Replace most relative imports with 2018-style crate
2019-02-20 08:50:53 -08:00
Joey
b8cb9f73c5
Merge branch 'master' into add_check_byte_value
2019-02-20 06:40:58 -08:00
janczer
51f6ec2325
Add checking if value more then 255 in bytearraya
2019-02-20 07:10:42 +01:00
janczer
24176f7bbb
Add more test for bytearray.pop and fix the panic message
2019-02-20 06:58:43 +01:00
janczer
bfdb82b5c1
Add pop to bytearray
2019-02-20 06:50:33 +01:00
janczer
2963dd5b66
Change error to panic in bytearray.clear
2019-02-19 20:38:38 +01:00
janczer
d5c91a8de0
Move clear method from bytes to bytearray
2019-02-19 07:11:13 +01:00
janczer
58369b6fbc
Delete unnessesary code from dict.clear
2019-02-18 18:45:49 +01:00
janczer
85110f6fbf
Add dict.clear and bytes.clear
2019-02-18 18:21:39 +01:00
Windel Bouwman
fcea8455fa
Merge pull request #473 from janczer/add_list_copy
...
Add copy method to set object
2019-02-18 10:50:20 +01:00
Windel Bouwman
43d9fc5dc0
Merge branch 'master' into fix_equality
2019-02-18 08:12:12 +01:00
Windel Bouwman
a47e979f29
Merge branch 'master' into add_list_copy
2019-02-18 08:08:31 +01:00
Joey Hain
7abaea556a
Micro-optimize list.__iadd__
2019-02-17 14:30:38 -08:00
Joey Hain
dcb29ab1f0
Add list.__iadd__
2019-02-17 10:54:25 -08:00
Calixte Denizet
5a154f9745
Fix list & tuple equality
2019-02-16 14:23:20 +01:00
Calixte Denizet
93c184a745
Fix fmt
2019-02-16 13:25:13 +01:00
Calixte Denizet
dd6b5b9aae
Fix list_eq
2019-02-16 13:15:58 +01:00