Commit Graph

674 Commits

Author SHA1 Message Date
Adam Kelly
e66b5078a8 Introduce TryIntoRef<T> to make vm.get_attribute more usable. 2019-03-21 10:58:32 +00:00
ben
4ad8d5ed9b Make property.__get__ owner parameter optional 2019-03-21 19:57:35 +13:00
ben
a5f6a7b10d Implement calling __set__ and __delete__ 2019-03-21 19:34:47 +13:00
coolreader18
3731148237 Merge branch 'master' into coolreader18/fix-clippy1 2019-03-20 09:03:07 -05:00
ben
08e66b5002 Create workaround for properties on None 2019-03-20 19:58:56 +13:00
ben
a5050ebafe Make property return itself if invoke by class binding 2019-03-20 19:58:54 +13:00
ben
6c3a402eca Fix setting attributes on modules 2019-03-20 19:58:48 +13:00
ben
48dd507cad Remove dict from object 2019-03-20 19:58:46 +13:00
ben
c77b1f3cf5 Fix bug with __getattr__ 2019-03-20 19:56:25 +13:00
ben
4e42bd077c Implement __setattr__ based on @nhynes(#540) PR 2019-03-20 19:53:50 +13:00
coolreader18
33b99b203f Some minor things 2019-03-19 20:34:35 -05:00
coolreader18
b30d56df29 Fix some more clippy warnings 2019-03-19 20:02:06 -05:00
coolreader18
4c9527be47 Merge branch 'master' into coolreader18/fix-clippy1 2019-03-19 19:19:36 -05:00
Windel Bouwman
5b6b33b644 Merge pull request #697 from RustPython/more_pyobject
More pyobject
2019-03-19 19:21:44 +01:00
Windel Bouwman
1969c90d98 Merge pull request #696 from palaviv/super
super in class methods
2019-03-19 19:08:53 +01:00
Adam Kelly
5384e07bf3 Remove PyObject::new from tuple and list. 2019-03-19 17:15:14 +00:00
Adam Kelly
c6e7d8901f Remove use of PyObject::new from objset. 2019-03-19 17:14:51 +00:00
Adam Kelly
638196bce4 Eliminate PyObject::new from objenumerate. 2019-03-19 16:42:40 +00:00
Adam Kelly
d38e89a811 Remove PyObject::new from objgenerator. 2019-03-19 16:28:53 +00:00
Adam Kelly
aeaa94966f Remove PyObject::new from objmap. 2019-03-19 16:24:19 +00:00
Aviv Palivoda
c3d0fddfcf Add PySuper 2019-03-19 18:08:43 +02:00
coolreader18
f78f558404 Fix clippy lints 2019-03-19 10:52:39 -05:00
Adam Kelly
6b3f61f3ca Merge branch 'master' into objdict_refactor 2019-03-19 10:19:03 +00:00
Aviv Palivoda
50cc9fa91f super works in class methods 2019-03-18 22:00:54 +02:00
Joey
d3b9714754 Convert print() builtin to new args style 2019-03-16 16:29:09 -07:00
Joey
9de7285d23 Merge remote-tracking branch 'origin/master' into joey/pyobject-function-split
Conflicts:
      vm/src/frame.rs
      vm/src/obj/objbytearray.rs
      vm/src/obj/objbytes.rs
      vm/src/obj/objcomplex.rs
2019-03-16 08:37:18 -07: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
Adam Kelly
2f5c3ef1df Use PyStringRef to check type of dictionary keys. 2019-03-16 09:42:54 +00:00
Adam Kelly
a718a5a723 Refactor dict methods to new style declarations. 2019-03-16 09:42:54 +00:00
Adam Kelly
da6c56a001 Use extend_class in declaration of dictionary. 2019-03-16 09:22:02 +00:00
Joey
7bfd2e6e84 Move function items out of pyobject module 2019-03-15 21:27:11 -07:00
Adam
0e6e8b617d Merge branch 'master' into prefer_pyvalue_into_ref 2019-03-15 22:11:51 +00:00
Adam Kelly
e8e8544b4b Avoid use of PyObject in objcomplex. 2019-03-15 16:09:04 +00:00
Adam Kelly
871ac15675 Avoid use of PyObject in objbytes. 2019-03-15 12:22:19 +00:00
Adam Kelly
7aa9b94243 Avoid use of PyObject in objbytearray. 2019-03-15 12:21:48 +00:00
Adam Kelly
111208b46f Remove PyRef::new/new_with_type. 2019-03-15 11:36:25 +00: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
f093aa4d6a Merge branch 'master' into pyvaluepayload 2019-03-14 20:25:51 -05:00
coolreader18
2af998ea86 Prevent recursion for Debug impls 2019-03-14 17:54:38 -05:00
Adam Kelly
5b41cc4b0d Fix subclasses of string. (Fixes #130) 2019-03-14 09:06:29 +00:00
Joey
964a0410e0 Merge pull request #677 from skinny121/property
Implement property attributes and functions
2019-03-13 22:20:10 -07:00
ben
3f301bd684 Implement property attributes and functions 2019-03-14 17:19:43 +13:00
Joey
36204f29fe Merge pull request #676 from adrian17/master
Use Into<BigInt> instead of ToBigInt to avoid copies
2019-03-13 18:54:36 -07:00
Adrian Wielgosik
6b1598dbb4 Change some methods to return BigInt directly 2019-03-13 20:21:07 +01:00
Adrian Wielgosik
f647f346f2 Use Into<BigInt> instead of ToBigInt to avoid copies 2019-03-13 20:20:42 +01:00
ben
067fc0927d Remove type parameter from PropertyBuilder 2019-03-14 07:24:49 +13:00
Windel Bouwman
f0e285d124 Merge pull request #665 from RustPython/type_mro
Type mro
2019-03-13 12:05:59 +01:00
coolreader18
d305d4f74b Clean up a bit 2019-03-12 19:06:12 -05:00
coolreader18
070f5aa322 Merge master into pyvaluepayload 2019-03-12 18:36:10 -05:00