coolreader18
6b537f15e5
Add objsequence::{opt_,}len
2020-01-10 18:24:22 +00:00
Jeong YunWon
226ebfa0c6
vm::sequence for SimpleSeq utilities
2020-01-07 22:24:05 +09:00
Jeong YunWon
18fcd99584
SimpleSeq for PyDeque
2020-01-07 22:11:26 +09:00
Jeong YunWon
12725a308e
PyList::borrow_sequence to borrow SimpleSeq
2020-01-07 22:00:21 +09:00
Jeong YunWon
0e583b2829
Refactor PyList to have elements as private field
2020-01-07 20:42:25 +09:00
Jeong YunWon
50ff5e89f9
sequence comparison uses impl SimpleSeq rather than dyn SimpleSeq
2020-01-06 02:34:56 +09:00
Jeong YunWon
9f4f8ad0ec
PyTuple::elements into private
2020-01-06 02:34:56 +09:00
Jeong YunWon
6c0f852b62
Refactor pymethod return types to be smaller as possible
2019-10-11 03:27:23 +09:00
Jeong YunWon
1fc5dcb5bf
Result<T, PyObjectRef> -> PyResult<T>
2019-10-11 02:59:47 +09:00
Jeong YunWon
2fac9bad71
Refactor sequence item comparison
2019-10-10 10:52:19 +09:00
HyeockJinKim
edf44a2b5d
Fix sequence comparison
...
Fixed gt, lt comparison of sequence. Also, the values of
le and ge are calculated using the not operation of gt and lt
Fixes #1450
2019-10-04 20:39:34 +09:00
Daniel Alley
a6662315c3
Fix typo
2019-09-23 15:41:48 -04:00
Noah
a429b09a0b
Allow match_class match expressions without parens around the target
2019-09-19 20:07:18 +00:00
Noah
dfeeda1c4c
Match an actual match expression in match_class!
2019-09-19 18:27:34 +00:00
Windel Bouwman
6cbab13098
Merge pull request #1298 from RustPython/clippy-warnings
...
Fix clippy warnings. Add proper names to symboltables.
2019-08-24 12:12:19 +02:00
Jeong YunWon
82d6fc81ff
PySliceableSequence return type can be non-Self sequence
2019-08-19 14:43:00 +09:00
Windel Bouwman
edf647160f
Fix clippy warnings. Add proper names to symboltables.
2019-08-18 10:03:00 +02:00
Windel Bouwman
e705ec292b
Add mktime function.
2019-07-13 11:26:44 +02:00
coolreader18
5b32dfbed9
Fix clippy and azure pipelines
2019-07-08 13:24:06 -05:00
coolreader18
fbeedb72bd
Fix seq_mul with negative numbers
2019-07-07 15:38:54 -05:00
coolreader18
9d3fa18ec8
Add __mul__ to deque
2019-07-07 15:38:47 -05:00
coolreader18
5153ad52ca
Add cmp methods to deque
2019-07-07 15:38:44 -05:00
Yonatan Goldschmidt
84684e5f7d
Don't use RefCell in tuple object
2019-05-19 23:57:32 +03:00
Yonatan Goldschmidt
802f07980e
Remove tuple handling from get_elements_cell
...
Like my HEAD, this shouldn't be allowed for a tuple (and the
only call-site of this function doesn't run on tuples anyway).
2019-05-19 23:01:10 +03:00
Yonatan Goldschmidt
9ad527c800
Remove tuple handling from get_mut_elements
...
This function is unused anyway; But even was it used, it makes no sense
to return mutable references to tuple items, when the tuple holding them
is immutable.
2019-05-19 23:01:05 +03:00
Jimmy Girardet
8a7c46da7b
add endswith startswith
2019-04-18 14:15:13 +02: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
Jimmy Girardet
86928114fa
resolve conflict
2019-04-08 10:33:56 +02:00
jgirardet
c487f12222
Merge branch 'master' into seq
2019-04-08 09:36:37 +02:00
Rachel Powers
909d94ec23
impl and use SequenceIndex for list.__delitem__
...
- removal of del_item
- all del function impl on PyListRef
- stepped deletion now loops only over the range
insted of the whole list
2019-04-05 20:25:53 -06:00
Rachel Powers
d0e6c3bd92
convert to PySliceRef as it is the only option
2019-04-04 04:52:33 -06:00
Rachel Powers
c97f342ef7
cleanup and rustfmt
2019-04-04 03:18:58 -06:00
Rachel Powers
aba059b81a
impl PySliceableSequenceMut & objseqence::del_item
...
used to impl list.__delitem__
2019-04-04 02:52:51 -06:00
ben
5625f7e15e
Allow arbitrary in slice, and convert slice.__new__ to new style
2019-03-31 09:58:02 +13:00
jgirardet
7d18a1ce60
Fix #746 : invalid slice with start or stop =-1 when step<0
2019-03-30 21:47:20 +01:00
Joey Hain
cc4f3fdb40
Clean up TypeProtocol
2019-03-25 19:18:01 -07:00
Adam Kelly
bbb7162472
Various dictionary changes.
...
* vm.ctx.new_dict returns a PyDictRef
* Special case for module goes away.
* Instances get a real dictionary.
2019-03-25 16:37:20 +00:00
Joey
f2d562a4cc
pyint: use as_bigint() everywhere
2019-03-24 10:05:25 -07:00
ben
6fa059fd6c
Make PyObject.typ a PyClassRef
2019-03-24 10:51:52 +13:00
coolreader18
a9051ab462
Convert all &mut VirtualMachine to &VirtualMachine
2019-03-22 01:48:14 -05:00
coolreader18
b30d56df29
Fix some more clippy warnings
2019-03-19 20:02:06 -05:00
Adam Kelly
336aa53b13
Allow IdProtocol to compare PyRef and non-PyRef.
2019-03-12 18:44:35 +00:00
Joey Hain
053ceb1a30
Move payload boxing into PyObject::new
2019-03-10 20:19:28 -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
Adrian Wielgosik
10531191bb
Convert most tuple/list methods to new args style
2019-03-08 20:43:20 +01:00
Joey
1bcbb28715
Convert list and tuple to Any payload
2019-03-07 21:10:43 -08:00
Joey
ecc92ffe33
Convert int to Any payload
2019-03-06 19:25:54 -08:00
Adrian Wielgosik
45da6b8af1
Add list.sort, sorted()
2019-02-26 22:03:45 +01:00
Joey Hain
f10fa6db44
Remove outer RefCell from PyObjectRef
2019-02-25 21:01:37 -08:00