Saurabh Kumar

Results 50 issues of Saurabh Kumar

Currently LPython fails in detecting the correct arrangement of arguments in a function's definition. The bug is chiefly that the compiler allows keyword arguments _before_ positional ones, both when defining...

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...

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 ```

```python print("a", "b", "c", "d") fruits: list[str] = ["apple", "guava", "mango"] mango: str = fruits.pop() print("I have got a", mango, "to eat!") ``` ### CPython ```console (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ python ./examples/example.py...

```python d: dict[str, str] = {"a": "hello", "b": "lpython"} d.keys() ``` ```console (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py Internal Compiler Error: Unhandled exception Traceback (most recent call last): Binary file "/home/saurabh-kumar/Projects/System/lpython/src/bin/lpython", in...

### Working ```python def fn(): alphabets: list[str] = ["a", "b", "c", "d", "e"] print("Original:", alphabets) reversed_alphabets: list[str] = reversed(alphabets) print("Reversed:", reversed_alphabets) fn() ``` ```console (base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py Original: ['a',...

In CPython, an assignment `b = a` stores the reference of `a` in `b`. This means that modifying `a` will reflect the changes in `b`. LPython however, creates a deep...

The build process freezes at the above step causing the system to eventually hang, with force shutdown being the only way out. The observation has been made multiple times. This...