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
7fd92fcc71
Py_TPFLAGS_BASETYPE
2020-01-30 16:32:09 +09:00
Jeong YunWon
582e5dfca9
cleanup tuple
2020-01-15 11:51:29 +09:00
Jeong YunWon
8c7e01b4f6
pyslot guess slot name from function name
2020-01-15 10:28:39 +09:00
Jeong YunWon
5e2035f979
remove unnessessary pub
2020-01-08 11:04:17 +09:00
Jeong YunWon
5a3937fd15
Refactor deque and fix comparison bug
2020-01-08 02:20:41 +09:00
Jeong YunWon
226ebfa0c6
vm::sequence for SimpleSeq utilities
2020-01-07 22:24:05 +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
0aca07a8cb
rustpython_vm::sequence & PySequenceContainer
2020-01-06 02:34:56 +09:00
Jeong YunWon
50ff5e89f9
sequence comparison uses impl SimpleSeq rather than dyn SimpleSeq
2020-01-06 02:34:56 +09:00
Jeong YunWon
6f313c191e
Refactor tuple comparison operators
2020-01-06 02:34:56 +09:00
Jeong YunWon
9f4f8ad0ec
PyTuple::elements into private
2020-01-06 02:34:56 +09:00
Noah
ed8c3b5d15
Impl IntoPyObject for tuples up to arity 7
2019-10-23 17:54:17 +00: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
HyeockJinKim
b2c19a964b
extend_class for PyTuple
2019-10-07 15:38:02 +09:00
Timur Makarchuk
4b962b89d7
Implement some __ne__ methods ( #1446 )
...
* Implement some __ne__ methods
Added test snippets from `__ne__` methods
* Fix incompatability in str.__eq__ befaviour
Previously "".__eq__(1) returned "False", which is not the case in
cpython.
Not it's returning 'NotImplemented', as it should
2019-10-06 00:50:02 +09:00
coolreader18
c46b5b50bd
Fix weirdness with type.__new__()/type()/metaclass.__new__()
2019-09-29 23:14:31 -05:00
Noah
0def37d78e
Make PyString.value private
2019-09-19 17:45:48 -05: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
Aviv Palivoda
93701098f9
Add Popen.communicate
2019-08-09 14:27:28 +03: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
hannut91
91d901abdb
Add tuple.__rmul__
...
Add tuple.__rmul__ and uncomment test snippet of __rmul__.
2019-06-29 16:02:42 +09:00
Michel Heily
f27265cf8a
Add get_value for objtuple
2019-06-17 19:35:09 +03:00
Maxim Kurnikov
bc35a64e54
fix most of clippy warnings
2019-06-01 03:19:22 +03:00
ben
d2757a2680
Fix merge issue with PyTuple::fast_getitem
2019-05-30 21:22:30 +12:00
ben
c0c531d550
Merge branch 'master' into sys_flags
...
# Conflicts:
# tests/snippets/sysmod.py
# vm/src/sysmodule.rs
2019-05-30 21:12:57 +12:00
Yonatan Goldschmidt
84684e5f7d
Don't use RefCell in tuple object
2019-05-19 23:57:32 +03:00
ben
2ca96c8ae1
Add sys.flags by creating a pystruct_sequence macro
2019-05-19 10:17:21 +12:00
Jeong YunWon
c768b25673
Refine hash types and refactor hash impl
2019-05-13 01:10:52 +09:00
Adrian Wielgosik
c7fd54e809
Convert iterators to pyclass macros
2019-05-01 21:26:37 +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
9a6f7aa8a1
Make PyRef::clone not require T implementing Clone
...
It seems to be a weird consequence of using PhantomData,
so I just rolled a custom Clone.
2019-03-24 11:56:15 +01:00
Windel Bouwman
fa8d3524bf
Use extend_class macro even more
2019-03-23 17:49:49 +01:00
Adam Kelly
9ebbde8126
Replace special cases in boolval with __bool__ method on types.
2019-03-23 09:31:42 +00: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
ben
5c7812734d
Use more specific ref type than PyObjectRef in PyContext
2019-03-23 13:00:12 +13:00
coolreader18
a9051ab462
Convert all &mut VirtualMachine to &VirtualMachine
2019-03-22 01:48:14 -05:00
Joey Hain
54753b3d14
list, tuple: return NotImplemented for unsupported comparisons
2019-03-20 18:32:08 -07:00
Adam Kelly
5384e07bf3
Remove PyObject::new from tuple and list.
2019-03-19 17:15:14 +00:00
Adam Kelly
6b3f61f3ca
Merge branch 'master' into objdict_refactor
2019-03-19 10:19:03 +00:00
Adam Kelly
9eeeeeae48
Change return type of vm.to_repr and vm.to_str to PyStringRef.
2019-03-16 09:42:54 +00: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
coolreader18
2af998ea86
Prevent recursion for Debug impls
2019-03-14 17:54:38 -05:00