bazelbuild / bazelbuild/starlark

`x in range(...)` should be allowed where x is not a number

Open
#175 1 comment 0 reactions 1 assignee Claimed by @brandjon View on GitHub
P3 type: feature request
Dominant language
Python
Stars
3.1k
Forks
178
PR merge metrics
No merged PRs in 30d

Description

> The `x in y` operator, where `y` is a range, reports whether `x` is equal to some member of the sequence `y`; the operation fails unless `x` is a number.

This is strange; `x in y` should have the same semantics as `x in list(y)`.

(First reported in bazelbuild/bazel#8722.)

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.