exaloop / exaloop/codon

Bug:List to tuple conversion

Open
#573 4 comments 0 reactions 1 assignee Claimed by @inumanag View on GitHub
bug
Dominant language
Python
Stars
16.8k
Forks
603
Avg merge
4d 23h
Merged PRs (30d)
6

Description

Dear developers,

It seems to me that Codon is unable to perform a simple conversion from a list to a tuple. Here is a minimal example:

```python
l = [1, 2]
t = tuple[int, int](l)
print(t)
```

The Python output is obviously `(1, 2)`, but Codon 0.16.3 complains with this error:

```
b.py:2:5-23: error: 'Tuple[int,int]' object has no method '__new__' with arguments (List[int])
```

This is a major nuissance as, many times, lists must be converted to tuples to insert them into dicts.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.