Which modules to implement from the Python standard library
The Python standard library has a lot of modules: https://docs.python.org/3/library/index.html, but many of them are rarely used. First we should concentrate on the most commonly used modules, probably:
sysosstringtimedatetimecmathdecimalnumbersfractionsstatisticsglobtempfileitertoolsfunctoolspicklecsvargparseloggingplatformjsonpdbast
Some of these might be initially difficult to implement, but some of these might be doable already.
I can work on implementing statistics.
I can begin with the random module
Should these modules be implemented in C++ or in LPython itself?
All these modules should be in LPython, i.e., the subset of Python that LPython can compile. You can try to implement some simple function and if LPython is missing some feature, you can open up an issue for it.
Basically if I were to implement something from this list, what I should do is refer to the Python documentation of that module and implement those same functions the same way using LPython. Am I correct?
Yes, and add them to src/runtime and add tests to integration_tests and register them in integration_tests/run_tests.py, they will be run via CPython (to ensure the test script is written correctly) as well as LPython (to ensure everything actually compiles).
I think itertools, datetime, sys and os should also be added to the lpython since they are used extensively in scientific computing. i can start the work for sys and os modules.
I think itertools, datetime, sys and os should also be added to the lpython since they are used extensively in scientific computing. i can start the work for sys and os modules.
Great. Let us know if you need any help!
sure could you provide me up links to the development guide so that I can set up the project locally. or any kind of documentation website
You can find the installation guide in the README.md file. For now, see https://docs.lfortran.org/developer_tutorial/ for more information -- LPython follows the same design as in LFortran.
so it doesn't have a documentation website ?
We currently don't have dedicated LPython documentation. We will eventually add it.
how about building one?
Yes, we should.
I would like to work for argparse. Can you please help me how to start?