Commit Graph

639 Commits

Author SHA1 Message Date
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
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
coolreader18
e49d7146a0 Add PyValuePayload trait and use it for PyObject.payload 2019-03-12 18:31:59 -05:00
Adrian Wielgosik
b334689e55 Remove Option from PyObject.typ; Refactor type hierarchy initialization. 2019-03-12 21:58:03 +01:00
Windel Bouwman
3cfee902ab Merge pull request #630 from lili668668/dict_get
Implement dict.get
2019-03-12 19:59:25 +01:00
Adam Kelly
336aa53b13 Allow IdProtocol to compare PyRef and non-PyRef. 2019-03-12 18:44:35 +00:00
Adam Kelly
9f96b16624 Turn PyClass.mro into a Vec<PyClassRef> 2019-03-12 15:09:03 +00:00
Adam Kelly
3082f5faef Trivial implementations of IdProtocol and TypeProtocol for PyClassRef. 2019-03-12 13:43:30 +00:00
Adam Kelly
48fba05e20 Change .__mro__ to read-only attribute so type.__mro__ works. 2019-03-12 11:27:42 +00:00
Adam Kelly
5742e32669 PropertyBuilder: Constraint on setter type is too strong. 2019-03-12 11:27:18 +00:00
Tzu-Yin Hong
de2b928676 Format the code 2019-03-12 11:46:47 +08:00
Joey
a8c02105d1 Merge pull request #662 from adrian17/objint
Convert most objint functions to new args style
2019-03-11 19:39:32 -07:00
Joey
db7d736c68 Merge pull request #661 from RustPython/obj-improvements
Move classmethod and staticmethod to own files. Also use extend_class…
2019-03-11 19:34:35 -07:00
Adrian Wielgosik
e3a5ac1378 Make objint::get_value return a reference 2019-03-11 23:07:56 +01:00
Adam Kelly
633a9b0365 Move more methods onto PyClassRef. 2019-03-11 18:58:15 +00:00
Adam Kelly
1e39512e74 Convert _mro to iterator. 2019-03-11 18:58:15 +00:00
Windel Bouwman
c00d368448 Move classmethod and staticmethod to own files. Also use extend_class more. 2019-03-11 19:38:26 +01:00
Adrian Wielgosik
4cbb1a38f1 Convert most objint functions to new args style 2019-03-11 19:20:22 +01:00
Windel Bouwman
caae69fc35 Merge pull request #658 from RustPython/mro
Cleaner type_type declaration, and faster instance checking.
2019-03-11 17:40:09 +01:00
Windel Bouwman
b8aa38db1a Merge pull request #653 from RustPython/joey/pyobject-2.0-prep
Remove PyObjectPayload enum
2019-03-11 17:33:51 +01:00
Adam Kelly
d7e1d69430 Avoid additional clone in objtype::subinstance. 2019-03-11 11:44:25 +00:00
Adam Kelly
4d779bbf98 isinstance/issubclass - avoid expensive construction of full mro. 2019-03-11 11:18:40 +00:00
Adam Kelly
7894627b9d Use extend_class in objtype. 2019-03-11 10:22:53 +00:00
ben
65c26a1f1b Use new_attribute_error in more places 2019-03-11 17:38:19 +13:00
Joey Hain
053ceb1a30 Move payload boxing into PyObject::new 2019-03-10 20:19:28 -07:00
Adrian Wielgosik
b123e58c55 Support index in list.pop() 2019-03-11 00:31:26 +01: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
45bc8c8f7a Move PyRef to pyobject module 2019-03-10 13:01:46 -07:00
ben
7c5be7d6b7 Add proper weakref type 2019-03-11 07:49:12 +13:00
Windel Bouwman
e8ec497b02 Merge pull request #637 from RustPython/scope_globals_locals
Scope globals locals
2019-03-10 17:13:03 +01:00
Chylli
e38a82e540 add __doc__ to str 2019-03-10 22:39:22 +08:00
Adam Kelly
3fbf627582 Merge branch 'master' into scope_globals_locals 2019-03-10 13:00:03 +00:00
Adam Kelly
0e23e706c9 Restructure scope to distinguish between locals and globals. 2019-03-10 12:38:43 +00:00
Adam
9e5b76c9b6 Merge pull request #635 from skinny121/property_refactor
Unify property like objects
2019-03-10 12:35:24 +00:00
Joey Hain
f6765cf16e less explicit returns 2019-03-10 00:34:21 -08:00
Joey Hain
e1d728e81f slice 2019-03-09 15:10:44 -08:00