Commit Graph

61 Commits

Author SHA1 Message Date
Jeong YunWon
6c0f852b62 Refactor pymethod return types to be smaller as possible 2019-10-11 03:27:23 +09:00
Noah
9ed825742c Revert " Fix argument keyword error in int/float/bool.__new__" 2019-10-02 21:33:43 -05:00
Sang-Heon Jeon
49577e0713 Merge branch 'master' into fix-int-arg 2019-10-02 15:19:01 +09:00
lntuition
a07daf322f Fix argument keyword error in bool.__new__
Add BoolArgs struct to fix argument keyword error in bool.__new
2019-10-02 15:13:45 +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
Aviv Palivoda
da61926d2b Merge pull request #1339 from palaviv/bool-like
Add IntoPyBool
2019-09-16 19:29:02 +03:00
Aviv Palivoda
85bf706436 Get class name directly 2019-09-15 18:34:02 +03:00
Aviv Palivoda
946c851dfa Change FALSE and TRUE of IntoPyBool to consts 2019-09-15 18:32:05 +03:00
Aviv Palivoda
944c0ad485 Rename PyBoolLike to IntoPyBool 2019-09-14 10:55:42 +03:00
ChJR
da020293d2 Refactor boolval() 2019-09-08 18:19:52 +09:00
ChJR
21821b7a72 Throw ValueError when __len__() is a negative value 2019-09-08 17:42:02 +09:00
ChJR
7b980920b9 Check __bool__() returns only bool value 2019-09-08 17:37:57 +09:00
Aviv Palivoda
7e25738a69 Change print flush arg to PyBoolLike 2019-09-04 19:03:49 +03:00
Aviv Palivoda
e3166a106c Add PyBoolLike 2019-09-04 15:52:56 +03:00
Jeong YunWon
0327428aa5 bool.real 2019-08-22 13:57:44 +09:00
Windel Bouwman
589c431c8c Merge master branch 2019-08-15 18:59:29 +02:00
Marcin Pajkowski
e65e9ff7c3 Make func_ref an &PyObjectRef 2019-08-15 13:45:47 +02: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
lynskylate
ab98775bd2 Optimize error info 2019-08-09 21:12:36 +08:00
lynskylate
3775e04dcd Fix pyobject truth value 2019-08-09 21:05:58 +08:00
Windel Bouwman
7e138eca3b Improve f-string syntax. Fixes #1099 2019-07-07 12:04:43 +02:00
Maxim Kurnikov
3bfd66bb89 make some exception messages more compatible with CPython, split get_method() into two methods and make raising TypeError more explicit for get_method() errors 2019-06-03 19:46:32 +03:00
Maxim Kurnikov
3b5cc1ad2f more doc comments, split with_exit() method for context manager __exit__ into two methods 2019-06-02 01:37:25 +03:00
Y. Sapir
45d7c383cd Implement bool.__ror__, __rand__ and __rxor__ 2019-05-04 22:27:43 +03:00
Y. Sapir
ea347dfdec Implement bool.__or__, __and__ and __xor__ 2019-05-03 01:54:18 +03:00
Darren Kaste
a8e064b1c0 Import TypeProtocol before use in type_check! 2019-04-14 17:19:44 -04:00
Joey
f2d562a4cc pyint: use as_bigint() everywhere 2019-03-24 10:05:25 -07:00
Adam Kelly
9ebbde8126 Replace special cases in boolval with __bool__ method on types. 2019-03-23 09:31:42 +00:00
Windel Bouwman
b93f96d491 Increase usage of extend_class macro. 2019-03-23 09:16:32 +01: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
d3b9714754 Convert print() builtin to new args style 2019-03-16 16:29:09 -07: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
1bcbb28715 Convert list and tuple to Any payload 2019-03-07 21:10:43 -08:00
Adam Kelly
488d9a5922 Merge branch 'master' into joey/int-any 2019-03-07 18:00:59 +00:00
Joey
ecc92ffe33 Convert int to Any payload 2019-03-06 19:25:54 -08:00
Adam Kelly
5afbfafa8b Remove special case for None payload from boolval. 2019-03-06 16:04:26 +00:00
Joey Hain
d9c35f94c2 Convert dict payload 2019-03-04 21:46:21 -08:00
Joey Hain
e7fb116210 Convert more objects to Any payload 2019-03-02 13:27:00 -08:00
Joey Hain
3478251d40 Merge remote-tracking branch 'origin/master' into joey/fun-with-functions
Conflicts:
      vm/src/lib.rs
      vm/src/pyobject.rs
      wasm/lib/src/vm_class.rs
2019-03-02 04:04:22 -08:00
coolreader18
f364ea5943 Fix a bunch of clippy lints 2019-03-01 18:41:45 -06:00
Joey Hain
67f8c02087 cleanup 2019-02-27 20:05:04 -08:00
Joey Hain
713edc57ee Convert some objstring methods to new style. 2019-02-27 19:53:31 -08:00
Joey Hain
f10fa6db44 Remove outer RefCell from PyObjectRef 2019-02-25 21:01:37 -08:00
Joey Hain
c14a8302e8 Initial prototype of "extractor pattern" for native funcs 2019-02-23 18:16:02 -08:00
Joey
df76ffe116 Replace most relative imports with 2018-style crate 2019-02-20 08:50:53 -08:00
ZapAnton
3464828499 Fixed various small clippy warnings 2019-02-06 13:24:24 +03:00
ZapAnton
0d3b218237 Fixed the 'toplevel_ref_arg' clippy warning
This replaces all the occurrences of the
'let ref var = another_var' with the
'let var = &another_var'

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
2019-02-05 21:45:56 +03:00