Skip to content

*args argument should be a Sequence, not a list #261

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

Closed
JukkaL opened this issue Sep 22, 2013 · 0 comments
Closed

*args argument should be a Sequence, not a list #261

JukkaL opened this issue Sep 22, 2013 · 0 comments
Labels
bug mypy got something wrong

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Sep 22, 2013

The type of a *args argument is a list (a leftover from Alore), even though it is actually a tuple (i.e. a Sequence until we add support for TupleSequence). For example, this program is accepted even though it fails at runtime:

def f(*x: int) -> None:
    x.append(1)  # Ouch
f(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

1 participant