305 Commits

Author SHA1 Message Date
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
541ad57d97 ... 2023-10-16 00:15:45 +08:00
blueloveTH
f66c031fa9 Update 80_json.py 2023-10-15 22:39:10 +08:00
blueloveTH
020bd7bd26 ... 2023-10-15 22:34:43 +08:00
blueloveTH
f41368afbb ... 2023-10-15 22:08:41 +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
3c6e4b4e76 ... 2023-10-15 15:15:44 +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
7cb0959922 fix a unittest error 2023-10-14 15:29:30 +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
92e4416c4e some refactor 2023-10-13 12:46:41 +08:00
blueloveTH
9f3d15ca51 ... 2023-10-13 12:18:33 +08:00
blueloveTH
38c0eb6bea ... 2023-10-12 22:17:26 +08:00
blueloveTH
eb5be9ba41 import can be used in local scope now 2023-10-12 01:02:46 +08:00
blueloveTH
3a3b97c070 improve exec/eval 2023-10-12 00:44:53 +08:00
BLUELOVETH
f837ace29c
Merge pull request #162 from MSaiKiran9/datetime-file
Datetime file update
2023-10-11 16:12:07 +08:00
blueloveTH
b26dbf08cc improve number parsing speed 2023-10-11 14:37:43 +08:00
blueloveTH
7c3ac48202 enable LTO 2023-10-11 13:20:48 +08:00
BLUELOVETH
df4e0e329a
Merge pull request #154 from stautonico/main
Added support for octal and binary literals
2023-10-11 13:06:08 +08:00
M Sai Kiran
9a30f4d5b5 revised-changes 2023-10-09 20:27:21 +05:30
blueloveTH
6dad2d612e ... 2023-10-09 00:03:23 +08:00
blueloveTH
0caa14172d fix ++ for global names 2023-10-08 20:55:31 +08:00
blueloveTH
27e40e61bd some fix 2023-10-08 16:44:15 +08:00
Steve Tautonico
badc8d44d1
Added binary literal support 2023-10-08 00:20:14 -04:00
blueloveTH
4df6d4fdb1 fix a bug of traceback 2023-10-08 01:36:11 +08:00
Steve Tautonico
4d2b3e59a1
Added octal literal support 2023-10-07 03:53:34 -04:00
blueloveTH
098b85f89b ... 2023-10-07 11:55:57 +08:00
blueloveTH
2f52561709 add more json test cases 2023-10-07 11:37:36 +08:00
blueloveTH
52c58ec87f Update 70_math.py 2023-10-06 01:13:19 +08:00
blueloveTH
6062e34a29 ... 2023-09-29 18:43:59 +08:00
blueloveTH
da7d30048b ... 2023-09-29 14:57:54 +08:00
blueloveTH
ac334e83a1 ... 2023-09-29 14:48:41 +08:00
blueloveTH
979b7f4a67 ... 2023-09-27 10:28:39 +08:00
blueloveTH
778a70e90f ... 2023-09-27 07:46:25 +08:00
blueloveTH
39706325dd ... 2023-09-27 06:55:31 +08:00
blueloveTH
5a42d35f9d ... 2023-09-27 06:45:18 +08:00
blueloveTH
888982ef7a ... 2023-09-27 05:14:33 +08:00
BLUELOVETH
7ca82df6ca ... 2023-09-25 18:00:12 +08:00
blueloveTH
d8f3a53220 ... 2023-09-24 19:44:15 +08:00
blueloveTH
c0866022fb fix a compiler bug of [] 2023-09-24 19:35:40 +08:00
blueloveTH
ffbb9af45e ... 2023-09-24 13:50:59 +08:00
blueloveTH
dd6e8fab9b reimpl goto 2023-09-24 13:47:47 +08:00
blueloveTH
6ca35ed4b9 ... 2023-09-22 20:48:54 +08:00
blueloveTH
71234ae73c ... 2023-09-22 20:08:34 +08:00
blueloveTH
e9b2060276 add ZeroDivisionError 2023-09-22 00:23:22 +08:00