Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weirdness with unpacking. #617

Open
lavirlifiliol opened this issue Dec 20, 2024 · 0 comments
Open

Weirdness with unpacking. #617

lavirlifiliol opened this issue Dec 20, 2024 · 0 comments

Comments

@lavirlifiliol
Copy link

The following valid Python programs fail to build via codon build. They will build if slightly edited.

$ codon --version
0.17.0
def u():
    yield 1,2,3
[[x,y,z]] = u() # fix via [[x,y,z]] = list(u()) or [x,y,z] = next(u())
# cex.py:3:13-16: error: 'Generator[Tuple[int,int,int]]' object has no attribute '__getitem__'
x, y = 0,0
while (x,y) == (0,0):
    [(x,y)] = [(0,0)] # fix via ((x,y),) = [(0,0)]
# cex.py:3:5-22: error: 'Tuple[int,int]' does not match expected type 'int'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant