Skip to content

docs: document strict value+type semantics of moonblade in/not in - #1105

Open
mvanhorn wants to merge 2 commits into
medialab:masterfrom
mvanhorn:fix/1095-2026-06-12-1451-docs-document-strict-typing-of-in-operator
Open

mvanhorn wants to merge 2 commits into
medialab:masterfrom
mvanhorn:fix/1095-2026-06-12-1451-docs-document-strict-typing-of-in-operator

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

The in / not in operator docs now warn that membership uses strict equality matching both value and type, with the cast workaround (int(col) in [1, 2, 3]). The empty help strings for x in y and x not in y are filled in, and the generated Markdown docs are regenerated via ./scripts/docs.sh.

Why this matters

#1095: @eeweegh found that int(b) not in [1, 2, 3] stopped matching after moonblade switched contains/in to strict value-and-type equality. @Yomguithereal confirmed the strict semantics are intended and asked for a doc warning ("a warned person makes for two"). The warning is scoped to list membership: string containers still cast the needle and accept regexes, so the prelude describes the list-membership strict-typing behavior the issue is about rather than claiming every x in y form is strict.

Testing

Docs-only change; ./scripts/docs.sh regenerated cheatsheet.md and functions.md so the embedded and generated help stay consistent. No Rust behavior change.

Fixes #1095

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

Successfully merging this pull request may close these issues.

array member test no longer working

1 participant