233 Commits

Author SHA1 Message Date
blueloveTH
3278699d03 remove operator module 2024-05-03 17:41:01 +08:00
blueloveTH
022e9c53fb move min/max to cpp 2024-05-03 17:38:32 +08:00
blueloveTH
dcb970d327 remove VAR_T 2024-05-02 16:24:13 +08:00
blueloveTH
f944113567 remove PY_CLASS macro 2024-05-02 15:55:22 +08:00
blueloveTH
aba90c1eb1 some optimize 2024-04-29 21:45:10 +08:00
blueloveTH
f619cee961 add FOR_ITER_UNPACK 2024-04-28 20:04:13 +08:00
blueloveTH
6cc4d9c5cc add PK_ENABLE_PROFILER 2024-04-27 20:01:58 +08:00
blueloveTH
99195ac490 fix dict.__init__ 2024-04-26 16:35:54 +08:00
blueloveTH
6189aaca94 use cpython style next() 2024-04-24 22:06:02 +08:00
blueloveTH
508cbfdb75 some refactor 2024-04-24 17:54:55 +08:00
blueloveTH
c6652736f3 Update pocketpy.cpp 2024-04-18 22:29:59 +08:00
blueloveTH
0ec01abdeb refactor __doc__ and rm __signature__ 2024-04-16 23:06:43 +08:00
blueloveTH
6ec6c5290b some fix 2024-04-14 21:26:03 +08:00
blueloveTH
d87c9ff850 add breakpoint 2024-04-14 20:33:04 +08:00
blueloveTH
b6d62c9d89 add breakpoint 2024-04-14 20:14:51 +08:00
blueloveTH
d3989474a7 some optimize 2024-04-14 12:32:45 +08:00
blueloveTH
7a145b6c02 Merge branch 'main' of https://github.com/pocketpy/pocketpy 2024-04-14 00:11:11 +08:00
BLUELOVETH
6bf645d738
add itertools (#239) 2024-04-13 23:44:07 +08:00
blueloveTH
1cc24d40a2 add compile 2024-04-13 23:20:50 +08:00
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