blueloveTH
f53a46941a
deprecate *non_tagged*
2024-04-11 11:50:15 +08:00
blueloveTH
dcb5f38ddf
make float
always 64-bit
2024-04-06 17:54:53 +08:00
blueloveTH
2219809fb4
support bytes slice
2024-04-06 17:18:35 +08:00
blueloveTH
10ca25f6b0
add enum
module
2024-04-06 17:00:50 +08:00
albertexye
936870c1f0
Perform boundary checks before searching to prevent security vulnerabilities ( #237 )
...
* perform boundary check before searching to prevent security vulnerabilities
* when a negative start index is passed to str.find, 0 is used instead
* a ValueError is raised when argument 'start' is a negative integer
2024-04-02 13:38:45 +08:00
albertexye
b1115a4c8f
Check the size of fillchar passed to str methods (ljust, rjust) ( #236 )
...
* check the size of fillchar passed to str methods (ljust, rjust)
* count characters using u8_length instead of size
2024-04-02 02:41:45 +08:00
ykiko
8ca7e9f6cf
add bit_length method to int. ( #233 )
...
* add bit_length method to int.
* Update pocketpy.cpp
* Update 01_int.py
* Update 01_int.py
---------
Co-authored-by: BLUELOVETH <blueloveTH@foxmail.com>
2024-03-28 19:51:39 +08:00
blueloveTH
c77fef35a2
refactor defaultdict
2024-03-28 19:21:56 +08:00
blueloveTH
d7545071e5
optimize int()
and float()
2024-03-28 17:50:23 +08:00
blueloveTH
d81a1c5415
add bytes.__add__
2024-03-28 15:04:10 +08:00
blueloveTH
dc20c56391
some fix
2024-03-24 18:01:03 +08:00
blueloveTH
6b57c684e4
some optimize
2024-03-17 19:22:17 +08:00
BLUELOVETH
65440c2034
Fix #197 ( #227 )
...
* init
* some optimize
* Update frame.h
* remove `LOAD_INTEGER`
* Update vm.cpp
* some optimize
* some fix
* Revert "remove `LOAD_INTEGER`"
This reverts commit c0b965aee2f64fbfae0b20f41d714688649d20cf.
* some fix
* Update expr.cpp
* some fix
* Update retype.yml
2024-03-16 18:37:09 +08:00
blueloveTH
63e869df0c
Revert "some optimize"
...
This reverts commit 31dc34663a0a2ffe45552eec7ceaca58759d228d.
2024-03-16 15:54:56 +08:00
blueloveTH
31dc34663a
some optimize
2024-03-16 15:42:04 +08:00
Anurag Bhat
2ab819a724
Modify string constructor to allow no arguments ( #226 )
...
* Modify String Constructor
* Add check to restrict arguments
2024-03-13 00:55:54 +08:00
blueloveTH
7f7e1a14ee
raise error on literal ints overflow
2024-03-04 16:48:47 +08:00
Anurag Bhat
5100f4e454
Floating inputs for round()
should return a Floating output when ndigit is 0 ( #217 )
...
* Fix round for floating inputs
* Refactor integer inputs
* some fix
---------
Co-authored-by: blueloveTH <blueloveth@foxmail.com>
2024-02-27 11:18:21 +08:00
blueloveTH
214395fab6
fix https://github.com/pocketpy/pocketpy/issues/214
2024-02-26 10:40:37 +08:00
blueloveTH
38dceac61b
add PK_SLICE_LOOP
2024-02-20 02:13:33 +08:00
blueloveTH
4ac915e25c
some fix
2024-02-18 18:59:58 +08:00
blueloveTH
bbe3773154
fix a bug
2024-02-18 18:08:11 +08:00
blueloveTH
97c923e514
use pod_vector
for small vectors
2024-02-18 17:51:35 +08:00
blueloveTH
635aae921f
fix compile warnings
2024-02-18 16:05:14 +08:00
blueloveTH
0df619b66f
str.index
and str.find
supports __start
2024-02-17 20:45:08 +08:00
blueloveTH
96d9e12cd6
list.index
supports __start
2024-02-17 20:36:20 +08:00
blueloveTH
ffee4a0354
some fix
2024-02-17 19:55:04 +08:00
blueloveTH
209b7f6831
add boilerplate for line_profiler
2024-02-07 10:50:53 +08:00
blueloveTH
dcb784a7a8
add array2d
module
2024-02-06 23:25:40 +08:00
blueloveTH
8f11ce0466
move strip
methods into cpp
2024-02-05 14:48:00 +08:00
blueloveTH
f55c3d7206
remove dataclasses.py
2024-02-05 11:59:41 +08:00
blueloveTH
7bd99279e5
fix https://github.com/pocketpy/pocketpy/issues/196
2024-02-04 17:53:31 +08:00
blueloveTH
1a9e9dc752
change source to std::string_view
2024-02-01 13:28:16 +08:00
blueloveTH
5ffb446d4a
fix https://github.com/pocketpy/pocketpy/issues/194
2024-01-26 12:07:33 +08:00
blueloveTH
d9c3f6c146
random refactor
2024-01-25 00:48:46 +08:00
blueloveTH
1404b97416
remove test module timeit
2024-01-20 23:29:57 +08:00
blueloveTH
068abe347f
update Tuple
's constructor
2024-01-20 23:21:42 +08:00
blueloveTH
0af2855ce5
replace format use of std::stringstream
with sprintf
2024-01-20 22:27:32 +08:00
blueloveTH
88c0102e79
fix https://github.com/blueloveTH/pocketpy/issues/192
2024-01-19 20:31:12 +08:00
blueloveTH
8d3bb6faa5
...
2024-01-19 19:13:10 +08:00
blueloveTH
25d06bdb44
remove OBJ_NAME
2024-01-19 14:50:06 +08:00
blueloveTH
ec75972d92
some cleanup
2024-01-19 13:26:51 +08:00
blueloveTH
af58396b04
...
2024-01-17 15:41:39 +08:00
blueloveTH
6455d40900
...
2024-01-17 15:29:35 +08:00
blueloveTH
123c8a6a92
rename to _type_name
2024-01-17 15:01:00 +08:00
blueloveTH
92638781ad
...
2024-01-16 16:20:20 +08:00
blueloveTH
e7f947c987
...
2024-01-16 16:14:13 +08:00
blueloveTH
cd1280d350
...
2024-01-16 01:42:03 +08:00
blueloveTH
d8d25894c7
...
2024-01-15 14:40:24 +08:00
blueloveTH
3362c23e53
some cleanup
2024-01-15 12:55:49 +08:00