Noah
516eead348
Replace PyStr.borrow_value() with .as_str()
2021-05-20 10:29:48 -05:00
Noah
376ce87b76
Move Either to crate::utils
2021-05-20 10:29:48 -05:00
Noah
99104faaf7
Re-export pyobject::* from the root of the crate
2021-05-20 10:24:07 -05:00
Noah
2a70fb2eed
Improve structsequence
2021-04-21 20:09:50 -05:00
Jeong YunWon
57bf7afdd9
every PyStructSequence is StaticType
2020-10-20 02:29:33 +09:00
Jeong YunWon
3b78c6068b
vm.class() only for non-static types
2020-10-20 02:29:31 +09:00
Jeong YunWon
9e6dfca9e9
Fix build with new builtins path
2020-10-11 21:16:16 +09:00
Jeong YunWon
59db19d1ea
PyClass -> PyType
2020-09-26 07:32:38 +09:00
Jeong YunWon
f81ad04ce3
PyString -> PyStr
2020-09-26 00:20:02 +09:00
Noah
ca5f2da9e9
Make more builtin functions be named
2020-09-21 10:32:25 -05:00
Noah
619f1a1de9
Make PyStructSequence a derive macro
2020-08-30 15:46:04 -05:00
Noah
79c0efc491
Make class.slots completely immutable
2020-08-30 15:46:04 -05:00
Jeong YunWon
ab37e455f3
BorrowValue for PyString
2020-08-09 14:14:55 +09:00
hatee-hatee-hatee-ho
6735ac5902
implemented __repr__ method in impl_pyclass_sequence
...
* implemented sys.version_info.__repr__
* support 'module' optional parameter for 'pyclass sequence' attribute.
* Separated module name and class name of 'pystruct_sequence' attribute parameter
2020-07-26 00:24:53 +09:00
Noah
3f9665370d
Allow to compile for 32-bit targets
2020-06-06 17:14:32 -05:00
Jeong YunWon
e98ee15d24
Fix datetime.fromtimestamp OverflowError
2020-05-13 03:30:03 +09:00
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
70b63eb758
new_rustfunc -> new_function & new_method to distinguish bindable functions
2020-01-12 18:39:16 +09:00
Aviv Palivoda
88c477fb6c
Fix CR comments
2019-12-30 21:31:36 +02:00
Aviv Palivoda
4aa032d299
Add time.perf_counter
2019-12-30 21:31:36 +02:00
coolreader18
32d1016a7f
Add a TryFromObject impl for std::time::Duration
2019-12-21 14:51:12 -06:00
coolreader18
68e9c12b9a
Make time.struct_time a struct_sequence
2019-12-02 18:16:28 -06:00
coolreader18
502f42b7cd
Use Duration::{from_secs_f64,as_secs_f64}
2019-10-28 11:40:18 -05:00
Noah
859cbf0c13
Add a check_signals method to vm
2019-10-23 17:54:15 +00:00
Aviv Palivoda
ca20acf7a0
Change time module to use primitives directly
2019-10-17 19:17:58 +03:00
Jeong YunWon
6c0f852b62
Refactor pymethod return types to be smaller as possible
2019-10-11 03:27:23 +09:00
Syrus
7495fc68ae
Added support for WASI
2019-10-07 12:30:48 -07:00
Noah
0def37d78e
Make PyString.value private
2019-09-19 17:45:48 -05:00
Noah
c61f1d20ea
Allow time.time() to work on WASM
2019-08-26 21:21:31 +00:00
coolreader18
0d492e7875
Raise a KeyboardInterrupt on a SIGINT
2019-08-23 16:57:39 -05:00
Jeong YunWon
32861cee46
Add slice support for PyTimeStructure
2019-08-19 14:43:00 +09:00
Jeong YunWon
27ab455e46
Add time.struct_time.isdst
2019-08-19 06:00:49 +09:00
Windel Bouwman
e705ec292b
Add mktime function.
2019-07-13 11:26:44 +02:00
Windel Bouwman
fb23cc6e03
Add time.ctime, time.strftime
2019-07-10 17:37:42 +02:00
Windel Bouwman
0ab39651b8
Add time.gmtime function.
2019-07-10 16:12:30 +02:00
Darren Kaste
a8e064b1c0
Import TypeProtocol before use in type_check!
2019-04-14 17:19:44 -04:00
Adam Kelly
9ed051e3b7
Module Initialisation takes VirtualMachine rather than PyContext.
2019-04-05 09:50:31 +01:00
coolreader18
a9051ab462
Convert all &mut VirtualMachine to &VirtualMachine
2019-03-22 01:48:14 -05:00
Joey
7bfd2e6e84
Move function items out of pyobject module
2019-03-15 21:27:11 -07:00
Adam Kelly
0ff5155af9
Rename mk_module to make_module.
2019-03-10 17:10:51 +00:00
Windel Bouwman
c33abe91e9
Use py_module macro at more places.
2019-02-26 19:53:58 +01:00
Joey
eec76ef8e8
Don't require objtype import to use arg_check! macro
2019-02-21 08:38:02 -08:00
Joey
df76ffe116
Replace most relative imports with 2018-style crate
2019-02-20 08:50:53 -08:00
ZapAnton
1043543f16
Fixed cast_lossless clippy warnings
2019-02-11 15:02:00 +03:00
coolreader18
e9bfea834a
Format module building in a more readable way
2019-01-28 23:02:43 -06:00
coolreader18
5ecff1b37e
Remove unnecessary to_string conversions
2019-01-27 21:45:21 -06:00
Windel Bouwman
0215830aaa
Move set_attr and set_item to context.
2018-12-12 19:41:09 +01:00
Windel Bouwman
079905277b
Add time module and improve lexer handling of numeric constants
2018-11-03 15:12:12 +01:00