lpython
lpython copied to clipboard
Python compiler
Due to the sync in https://github.com/lcompilers/lpython/pull/2836 we had to disable some tests in integration tests. Let's enable them again, one by one, by porting the implementation from the old version...
code generation error: Type number '19' not supported --> input.txt:4:1 | 4 | h = TypeVar("h") | ^^^^^^^^^^^^^^^^
```py import string print(string.ascii_uppercase) ``` The above code runs without any issue but ```py import string ``` simply importing causes an unhandled exception ``` $ lpython issue/main.py ASR verify pass...
Fix #2723 Add support for class members by identifying them by the new intent `ClassMember` and creating a global variable for each class member. All the tests are not passing...
```py class Foo: def __init__(self: "Foo", bar: i32): self.bar: i32 = bar def __repr__(self: "Foo") -> str: return str(self.bar) def main(): a: Foo = Foo(10) print(a) main() ``` Works fine...
There are some CI tests that seem to be flaky and fail. 1. Failure in ctest. ```console Test project /home/runner/work/lpython/lpython Start 1: test_stacktrace 1/2 Test #1: test_stacktrace .................. Passed 0.00...
Consider ``` ./src/bin/lpython -I/Users/brian/Documents/GitHub/lpython/src/runtime/ltypes/ltypes.py --show-asr --no-color ./examples/expr2.py (TranslationUnit (SymbolTable 1 {_lpython_main_program: (Function (SymbolTable 4 {}) _lpython_main_program [main0] [] [(SubroutineCall 1 main0 () [] ())] () Source Public Implementation () .false....
Fix #2677 and #2668. I think `global_sep_space` isn't needed because we set the sep to `" "` as the default when it's not specified. I couldn't figure out why that...
repro : https://github.com/rebcabin/lpython/tree/brian-lasr/lasr/lpython/Issue1946 The following works in ordinary CPython: ```python hexit : str = r'[0-9a-fA-F]' octit : str = r'[0-7]' digit : str = r'[0-9]' alpha : str = r'[_a-zA-Z]'...
**Issue Description:** The current implementation of the library contains Fortran-specific references that limit its applicability to environments and languages other than Fortran. Specifically, the abi, tbind, and several other components...