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

isinstance doesn't know about the range type #3039

Closed
chrisnovakovic opened this issue Jan 11, 2024 · 0 comments · Fixed by #3040
Closed

isinstance doesn't know about the range type #3039

chrisnovakovic opened this issue Jan 11, 2024 · 0 comments · Fixed by #3040
Assignees
Labels

Comments

@chrisnovakovic
Copy link
Contributor

range is now a type of its own as of #3024:

func (r *pyRange) Type() string {
return "range"
}

But:

log.fatal(isinstance(range(1, 6), range))
18:30:00.266 CRITICAL: //BUILD: [False]
chrisnovakovic added a commit to chrisnovakovic/please that referenced this issue Jan 11, 2024
`range` is a type of its own as of thought-machine#3024, but `isinstance` doesn't know
about it, so it's impossible to do type comparisons on `range` objects.

Fixes thought-machine#3039.
@chrisnovakovic chrisnovakovic self-assigned this Jan 11, 2024
chrisnovakovic added a commit to chrisnovakovic/please that referenced this issue Jan 11, 2024
`range` is a type of its own as of thought-machine#3024, but `isinstance` doesn't know
about it, so it's impossible to do type comparisons on `range` objects.

Fixes thought-machine#3039.
chrisnovakovic added a commit that referenced this issue Jan 12, 2024
`range` is a type of its own as of #3024, but `isinstance` doesn't know
about it, so it's impossible to do type comparisons on `range` objects.

Fixes #3039.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant