Adam Kelly
0fe3f7748c
Simplify PyDictRef.__repr__.
2019-04-06 10:15:31 +01:00
Adam Kelly
7b2d92f495
Delete DictProtocol. impl ItemProtocol for PyDictRef.
2019-04-06 10:15:29 +01:00
Adam Kelly
ee9066a713
dict.get shouldn't call into __getitem__
2019-04-06 10:12:16 +01:00
Adam Kelly
3e42edd261
dict.__new__ - support for dict subtypes.
2019-04-06 10:12:16 +01: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
jgirardet
a7d5b0e9ac
start
2019-04-06 01:44:00 +02:00
Rachel Powers
c3ecf0ef9e
Merge branch 'master' into ryex-impl-list.__delitem__
2019-04-05 17:15:32 -06:00
Aviv Palivoda
2a3a88c2f2
Use match_class macro to avoid unwanted clones
2019-04-05 19:59:01 +03:00
Aviv Palivoda
a685216f29
Use new arg style for set and frozenset new
2019-04-05 19:59:01 +03:00
Aviv Palivoda
ed8c1e1a95
Implement set and frozenset with PySetInner
2019-04-05 19:58:17 +03:00
Adam Kelly
f354f4ce02
Move contains_key to PyDictRef.
2019-04-05 16:18:10 +01:00
Adam Kelly
4212594c5b
Prefer key to needle.
2019-04-05 16:16:55 +01:00
Adam Kelly
ec94168a15
Remove objdict::get_key_value_pairs.
2019-04-05 16:16:55 +01:00
Windel Bouwman
59d8612cfa
Merge pull request #782 from skinny121/abc_module
...
Add abc module from CPython
2019-04-05 17:05:45 +02:00
Windel Bouwman
e2293ead70
Merge pull request #780 from RustPython/dict_non_str_keys
...
Support non-string keys in dictionaries.
2019-04-05 16:56:58 +02:00
Rachel Powers
a41e8973bd
Merge branch 'master' into ryex-impl-list.__delitem__
2019-04-05 03:59:44 -06:00
Adam Kelly
b943f4a4bb
Historic real proper dictionary support.
2019-04-05 09:50:31 +01:00
Adam Kelly
9ed051e3b7
Module Initialisation takes VirtualMachine rather than PyContext.
2019-04-05 09:50:31 +01:00
Adam Kelly
7438b0685c
Changes suggested by code review.
2019-04-05 09:50:31 +01:00
Adam Kelly
c8eda3733d
Eliminate ctx.set_attr.
2019-04-05 09:50:31 +01:00
Adam Kelly
bce4f1e483
Simplify/shrink the dict interface.
2019-04-05 09:39:59 +01:00
Joey
05ede30c51
range index
2019-04-04 07:52:53 -07:00
Joey
1c958c93b1
Merge pull request #774 from RustPython/joey/match-class
...
Add match_class! macro
2019-04-04 07:13:31 -07: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
c01dc5310a
Add callback parameter to weakref, at the moment this callback isn't yet
...
implement though.
2019-04-04 20:11:53 +13:00
ben
ea872521d6
Make object by default hashable
2019-04-04 20:11:53 +13:00
Rachel Powers
fa53d5cd65
impl list.__delitem__ using list.__setitem__ as a guide
...
while it works as well as __setitem__ currently does this impliments no
support for slice indexing or negative indexing, adtionaly a bad index
panics insted of giving a vm type error!
2019-04-03 21:11:03 -06:00
Joey Hain
88bf2a32c4
address feedback
2019-04-03 17:30:04 -07:00
Joey
6863c19fb7
complex: convert to new args style
2019-04-02 09:51:06 -07:00
Joey
75d02a1725
complex: move to impl block
2019-04-02 09:30:18 -07:00
ben
ea2622ee7b
Make slice.stop not an option
2019-04-02 17:25:51 +13:00
coolreader18
a77b3489b7
Merge pull request #764 from RustPython/coolreader18/py_class-proc-macro
...
Add #[py_class] attribute proc macro
2019-04-01 23:17:38 -05:00
Joey Hain
8549ea22a3
Use match_class! in objint::to_int
2019-04-01 20:22:11 -07:00
Joey Hain
98889d5339
match_class! macro
2019-04-01 20:09:45 -07:00
Adrian Wielgosik
de5b1c4055
Support iter() for types with only __getitem__
2019-04-01 19:45:16 +02:00
Adrian Wielgosik
c918e9d5d3
Split iterators into separate types
2019-04-01 19:45:14 +02:00
Adrian Wielgosik
bbfca26b27
Move PyIteratorValue to objiter.rs
2019-04-01 19:45:10 +02:00
Adrian Wielgosik
cba8aa9be5
Drop iter_type_init, explicitly define __iter__ for iterators
2019-04-01 19:45:07 +02:00
Adrian Wielgosik
016ecf204d
Move iterator __contains__ to 'in' implementation
2019-04-01 19:45:00 +02:00
coolreader18
43b0760173
Merge branch 'master' into coolreader18/py_class-proc-macro
2019-03-31 21:16:25 -05:00
coolreader18
53b46a7b32
Split some of #[pyclass] off into #[pyimpl]
2019-03-31 17:23:33 -05:00
coolreader18
15cffc4d2b
Clean up a bit
2019-03-30 22:30:14 -05: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
jgirardet
7d18a1ce60
Fix #746 : invalid slice with start or stop =-1 when step<0
2019-03-30 21:47:20 +01:00
Joey Hain
83c1d4fe10
Merge remote-tracking branch 'origin/master' into joey/convert-bytes
2019-03-30 13:31:43 -07:00
coolreader18
d9efe4ea37
Require a #[pymethod] for a method to be recognized
2019-03-29 16:16:31 -05:00