203 Commits

Author SHA1 Message Date
blueloveTH
f650f159b4 ... 2023-12-30 14:33:04 +08:00
blueloveTH
1e178caf6e add cmath module 2023-12-30 13:57:51 +08:00
blueloveTH
b89395a1fe some cleanup 2023-12-26 21:52:05 +08:00
blueloveTH
32b89d45f0 ... 2023-12-24 01:24:30 +08:00
blueloveTH
475bce9999 add @dataclass 2023-12-21 23:09:23 +08:00
blueloveTH
3219f588c2 disable users to create module 2023-12-18 16:15:37 +08:00
blueloveTH
c9f93f126c ... 2023-12-09 18:26:53 +08:00
blueloveTH
f6942e0caf experimental support for try..except..as 2023-12-04 18:09:21 +08:00
blueloveTH
9179c31d6a some change about mappingproxy 2023-12-02 16:22:08 +08:00
blueloveTH
da12d4b8ff update PrintFunc 2023-11-29 12:20:38 +08:00
blueloveTH
a62943568f add csv module 2023-11-28 22:40:37 +08:00
blueloveTH
acbfd11366 remove dylib support 2023-11-22 06:32:34 +08:00
blueloveTH
641a1711cf fix https://github.com/blueloveTH/pocketpy/issues/177 2023-11-07 05:05:03 +08:00
blueloveTH
e124f635c1 support @property.setter 2023-11-07 04:50:06 +08:00
blueloveTH
a7448b7fa0 make json.loads accept bytes 2023-10-31 21:34:30 +08:00
blueloveTH
905defb534 fix a bug of datetime and localtime 2023-10-30 23:55:06 +08:00
blueloveTH
49f70318d9 ... 2023-10-29 22:44:14 +08:00
blueloveTH
f2d5fbbb94 add module operator and add split for single char 2023-10-29 22:16:49 +08:00
blueloveTH
04df1dbe5b fix https://github.com/blueloveTH/pocketpy/issues/172 2023-10-28 15:10:58 +08:00
blueloveTH
a12eb4c8bc ... 2023-10-28 15:00:53 +08:00
S Mahmudul Hasan
c82bfb5455
Implement deque in C++ as required by #139 (#155)
* Initial integration of deque in collections

* some fix

* WIP: Implemented a int-only deque with limited capabilities

* WIP: added some more functionality -> changed int to arbitrary objects

* WIP: Added more functionalities in deque

* WIP: switched to std::deque

* WIP: added more functionalities

* WIP: minor fix

* WIP: added constructor

* WIP: added deque iterator

* WIP: added more functionalities

* Cleaned up and added more functionalities

* minor fix, std::min

* minor fix, rotate, n=0 case

* fix `collections` module

* support pickle

* refactored collections module

* Added some tests, more to follow

* Fixed the tests, more to follow

* Fixed some functionalities and added more tests

* added more tests, called __init__ from pickle, added reverse iterator option

* added the tests

* dropped support for __init__ for now

* moved deque iterator to collections.cpp

* undo unnecessary changes

* Cleaned up and added __str__() support

---------

Co-authored-by: blueloveTH <blueloveTH@foxmail.com>
2023-10-21 07:47:11 +08:00
blueloveTH
e8b1449979 ... 2023-10-16 00:08:26 +08:00
blueloveTH
5e3572b32c replace std::stringstream with SStream 2023-10-15 21:58:33 +08:00
blueloveTH
e4b6d566a7 add SStream 2023-10-15 21:36:30 +08:00
blueloveTH
cdcdded9a3 some fix 2023-10-15 16:47:53 +08:00
blueloveTH
227e76e3e4 cjson cleanup 2023-10-15 15:00:25 +08:00
Mahbub Alam
2950d88545
Add cjson module (#151)
* Add cjson module

* Create structure for cjson module

* Implemenet loads function

* Convert cJsonBool to python boolean

* Implement dumps function

* Convert json bool and null to python Bool and None

* necessary changes of project structure

* Update amalgamate.py

* Support non-dictionary json objects (list, tuple, string, number, bool, null)

* Fix tests

* fix CI

* fix CI

* Convert python to cJson and then to string

* Delete cJSON object after use

---------

Co-authored-by: Mahbub Alam <alam.mahbub214@gmail.com>
Co-authored-by: blueloveTH <blueloveth@foxmail.com>
2023-10-15 13:32:20 +08:00
blueloveTH
53e4043e0e fix a bug of _class in Function 2023-10-15 04:44:10 +08:00
blueloveTH
c3f10ae4d1 fix a bug of type.__class__ 2023-10-15 04:31:16 +08:00
blueloveTH
0157025097 disable code serialization impl 2023-10-14 15:25:07 +08:00
blueloveTH
5ecd59f11c ... 2023-10-13 13:12:05 +08:00
blueloveTH
a5b7a0d1ae ... 2023-10-13 12:59:43 +08:00
blueloveTH
99fbb7c736 refactor NameDict 2023-10-12 21:30:41 +08:00
blueloveTH
3a3b97c070 improve exec/eval 2023-10-12 00:44:53 +08:00
blueloveTH
dbf7dfe7da ... 2023-10-11 14:46:54 +08:00
blueloveTH
b26dbf08cc improve number parsing speed 2023-10-11 14:37:43 +08:00
blueloveTH
57beebdfd9 ... 2023-10-11 13:05:07 +08:00
blueloveTH
cf7dc098a3 remove windows.h 2023-10-02 06:38:23 +08:00
blueloveTH
724f693761 reimpl bytes 2023-10-02 03:05:21 +08:00
blueloveTH
e6b89a1206 fix box2d 2023-10-01 22:54:08 +08:00
blueloveTH
895b3a8d1d update bindings 2023-09-29 12:24:34 +08:00
blueloveTH
5a42d35f9d ... 2023-09-27 06:45:18 +08:00
blueloveTH
2ccc1bd6f1 ... 2023-09-26 20:42:11 +08:00
blueloveTH
d8f3a53220 ... 2023-09-24 19:44:15 +08:00
blueloveTH
71234ae73c ... 2023-09-22 20:08:34 +08:00
BLUELOVETH
c939ad727b ... 2023-09-22 18:32:56 +08:00
blueloveTH
e9b2060276 add ZeroDivisionError 2023-09-22 00:23:22 +08:00
blueloveTH
bb96279e9b ...
...
2023-09-22 00:14:09 +08:00
blueloveTH
c9389470bb ... 2023-09-21 23:41:22 +08:00
blueloveTH
8a4045d2a5 ... 2023-09-21 23:33:18 +08:00