lpython
lpython copied to clipboard
Python compiler
It would be good if you could upload lpython to PyPI so that we can install it via pip. This would make it more convenient for people to install lpython...
I've just tried to compile on Fedora 39, and I've hit this error: ``` evaluator.cpp:39:10: fatal error: llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory 39 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` According...
These are my findings with the first steps to compile lpython on Msys2 environments. The environments I tested are the `ucrt64` and the `clang64` environment. 1. the `version` file is...
The value of `sep` is ignored while printing when two adjacent values are strings. ```python print("a", "b", "c", "d", "e", sep="-") ``` ```console (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py abcde ``` The...
```python from lpython import i32 def test_set_add(): s1: set[i32] = {0} i: i32 total: i32 = 10000 l: list[i32] = [4444, 5348, 769, 3741, 1697, 7374, 4509, 4146, 534, 1111,...
Support f-strings in lpython, because f-strings are awesome. Previously, expression enclosed inside the f-strings was not parsed correctly. (Fixes #641 ) TODO: - [x] Add new tokens to handle f-strings....
Addressing https://github.com/lcompilers/lpython/issues/2614#issuecomment-2035025925 We have been using the `basic_free_stack` out of symengine's C wrapper untill now. But before freeing out variables we need to check if they have been stack allocated...
fixes #2669 ```python print("a", "b", "c", "d") fruits: list[str] = ["apple", "guava", "mango"] mango: str = fruits.pop() print("I have got a", mango, "to eat!") ``` ```console (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py...
```python seperator: str = "#" print(1, 2, 3, 4, 5, sep=seperator) ``` #### CPython ```console (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ python ./examples/example.py 1#2#3#4#5 ``` #### LPython ```console (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py 12345 ```
MRE ```py char: str char = "" ``` ```console $ lpython examples/expr2.py --backend=c expr2__tmp__generated__.c:13:8: error: expected identifier or '(' char * char = NULL; ^ expr2__tmp__generated__.c:16:23: error: expected expression _lfortran_strcpy(&char,...