Bug:List to tuple conversion
Open
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
Assessment
This issue has not been assessed yet.