Jeong YunWon
|
4be3a365ce
|
non-int indexable base for int()
|
2020-02-29 10:07:14 +09:00 |
|
Jeong YunWon
|
6ddb690e09
|
Remove _vm parameter when it is not required
|
2020-02-06 11:07:51 +09:00 |
|
Jeong YunWon
|
1bac582921
|
&str::to_string -> &str::to_owned for literals
|
2020-02-05 22:55:33 +09:00 |
|
Jeong YunWon
|
b2ba6b2013
|
objtype::class_*_attr into PyClassRef methods
|
2020-01-29 21:30:33 +09:00 |
|
Jeong YunWon
|
8c7e01b4f6
|
pyslot guess slot name from function name
|
2020-01-15 10:28:39 +09:00 |
|
Jeong YunWon
|
c1306726c4
|
Fix clippy warnings
|
2019-12-21 18:49:48 +09:00 |
|
Oscar Shrimpton
|
b86e803fec
|
Implement .indices(len) of slice (Fixes #1431)
range.__getitem now also uses slice.indices() internally.
CPython: https://github.com/python/cpython/blob/master/Objects/sliceobject.c#L373
|
2019-10-20 20:27:08 +01:00 |
|
Jeong YunWon
|
16c3c78b69
|
introduce and adapt vm.identical_or_equal to test is or else __eq__
|
2019-10-12 17:53:26 +09:00 |
|
Jeong YunWon
|
6c0f852b62
|
Refactor pymethod return types to be smaller as possible
|
2019-10-11 03:27:23 +09:00 |
|
Jeong YunWon
|
2fac9bad71
|
Refactor sequence item comparison
|
2019-10-10 10:52:19 +09:00 |
|
HyeockJinKim
|
96c93c4a21
|
Add __hash__ of slice
When hashing slice, raise TypeError
Issue #1431
|
2019-10-06 15:28:36 +09:00 |
|
HyeockJinKim
|
67bc687b31
|
Add comparison of slice
Add gt, ge, lt, le for slice
Issue #1431
|
2019-10-05 17:34:08 +09:00 |
|
Noah
|
36a4e107d7
|
Merge pull request #1414 from RustPython/coolreader18/enum-module
Fix weirdness with type.__new__()/type()/metaclass.__new__() in order to support enum
|
2019-10-01 07:26:31 -05:00 |
|
HyeockJinKim
|
cc8f221c67
|
Implement __eq__, __ne__ of slice
Compute __eq__ and __ne__ by comparing start,
stop and step of slice
Issue #1431
|
2019-10-01 14:39:21 +09:00 |
|
coolreader18
|
c46b5b50bd
|
Fix weirdness with type.__new__()/type()/metaclass.__new__()
|
2019-09-29 23:14:31 -05:00 |
|
HyeockJinKim
|
442e0d0255
|
Add __repr__ of slice
Issue: #1431
|
2019-09-29 16:54:04 +09:00 |
|
HyeockJinKim
|
5df5ba67ed
|
extend_class for PySlice
|
2019-09-29 15:32:58 +09:00 |
|
Windel Bouwman
|
d06dec77ea
|
Attempt to reduce the size of the pyobject.rs files by splitting out builtin types.
|
2019-08-14 19:08:47 +02:00 |
|
ben
|
9b71424d4e
|
Use slice.xxx_index() methods in setslice and delslice
|
2019-04-17 20:02:08 +12:00 |
|
ben
|
f2873a519d
|
Merge branch 'master' into slice_new
# Conflicts:
# tests/snippets/builtin_slice.py
# vm/src/frame.rs
# vm/src/obj/objrange.rs
# vm/src/obj/objslice.rs
|
2019-04-17 19:44:46 +12:00 |
|
Darren Kaste
|
a8e064b1c0
|
Import TypeProtocol before use in type_check!
|
2019-04-14 17:19:44 -04:00 |
|
ben
|
6650ad895a
|
Fix a bunch of clippy warnings
|
2019-04-14 10:07:50 +12:00 |
|
ben
|
ea2622ee7b
|
Make slice.stop not an option
|
2019-04-02 17:25:51 +13:00 |
|
ben
|
e0f7fbb191
|
Don't derive FromArgs on payload type.
|
2019-03-31 10:53:45 +13:00 |
|
ben
|
a49895ef63
|
Cleanup slice_new and added more slice tests
|
2019-03-31 09:58:02 +13:00 |
|
ben
|
5625f7e15e
|
Allow arbitrary in slice, and convert slice.__new__ to new style
|
2019-03-31 09:58:02 +13:00 |
|
Adrian Wielgosik
|
8f1ec3dd23
|
Convert slice::{start, stop, stop} to new args style
|
2019-03-28 23:08:46 +01:00 |
|
Joey
|
e5066da94e
|
Merge remote-tracking branch 'origin/master' into joey/range-getitem-either
|
2019-03-23 15:50:12 -07:00 |
|
Joey
|
a5558e0e32
|
Introduce Either extractor and convert range.__getitem__
|
2019-03-23 15:05:12 -07:00 |
|
ben
|
faf1925a25
|
Remove usages of PyClassRef::from_pyobj
|
2019-03-24 10:51:52 +13:00 |
|
ben
|
6fa059fd6c
|
Make PyObject.typ a PyClassRef
|
2019-03-24 10:51:52 +13:00 |
|
ben
|
c1d5ce715f
|
Change isinstance/issubclass to accept PyClassRef instead of PyCObject.
Also changed PyValue::class to return a PyClassRef.
|
2019-03-23 19:32:31 +13:00 |
|
Windel Bouwman
|
68ba050030
|
Use the extend class macro more.
|
2019-03-22 20:45:34 +01:00 |
|
coolreader18
|
a9051ab462
|
Convert all &mut VirtualMachine to &VirtualMachine
|
2019-03-22 01:48:14 -05:00 |
|
Joey
|
7bfd2e6e84
|
Move function items out of pyobject module
|
2019-03-15 21:27:11 -07:00 |
|
Joey
|
fa9e48a5b3
|
Take &mut VirtualMachine insteadof &PyContext
|
2019-03-14 21:43:19 -07:00 |
|
Joey
|
737ec12fa5
|
Rename PyValue::{required_type => class}
|
2019-03-14 20:08:41 -07:00 |
|
Adrian Wielgosik
|
e3a5ac1378
|
Make objint::get_value return a reference
|
2019-03-11 23:07:56 +01:00 |
|
Joey Hain
|
053ceb1a30
|
Move payload boxing into PyObject::new
|
2019-03-10 20:19:28 -07:00 |
|
Joey Hain
|
5971fc3bd4
|
rename PyObjectPayload2 to PyValue
|
2019-03-10 13:48:51 -07:00 |
|
Joey Hain
|
e2e13af7ea
|
Remove PyObjectPayload
|
2019-03-10 13:45:38 -07:00 |
|
Joey Hain
|
e1d728e81f
|
slice
|
2019-03-09 15:10:44 -08:00 |
|
Joey Hain
|
f10fa6db44
|
Remove outer RefCell from PyObjectRef
|
2019-02-25 21:01:37 -08:00 |
|
Joey
|
eec76ef8e8
|
Don't require objtype import to use arg_check! macro
|
2019-02-21 08:38:02 -08:00 |
|
Joey
|
df76ffe116
|
Replace most relative imports with 2018-style crate
|
2019-02-20 08:50:53 -08:00 |
|
ben
|
907dfb6770
|
Add slice type and use BigInts in slice payload.
|
2019-02-09 12:07:04 +13:00 |
|