Skip to content

docs: clarify mixed comparison/equality operators#9862

Merged
orizi merged 1 commit intostarkware-libs:mainfrom
Elena343-ai:docs-mixed-comparison-equality-operators
Apr 21, 2026
Merged

docs: clarify mixed comparison/equality operators#9862
orizi merged 1 commit intostarkware-libs:mainfrom
Elena343-ai:docs-mixed-comparison-equality-operators

Conversation

@Elena343-ai
Copy link
Copy Markdown
Contributor

Summary

Document that mixed consecutive comparison/equality operators such as a < b == c and a == b < c are also unsupported on the comparison operators page, and show the supported conjunction/parenthesized alternatives.


Type of change

  • Bug fix (fixes incorrect behavior)
  • New feature
  • Performance improvement
  • Documentation change with concrete technical impact
  • Style, wording, formatting, or typo-only change

Why is this change needed?

The comparison operators page currently explains that a < b < c is unsupported, but it does not mention that mixed consecutive comparison/equality operators are rejected as well. Because the same page also says that comparison and equality operators share a precedence level, readers can reasonably infer that forms like a < b == c are valid. The parser rejects these expressions with E1028.


What was the behavior or documentation before?

The page only documented unsupported chained comparisons such as a < b < c.


What is the behavior or documentation after?

The page also documents unsupported mixed forms such as a < b == c and a == b < c, and
shows explicit conjunction/parenthesized alternatives.


Related issue or discussion (if any)

N/A


Additional context

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@orizi reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Elena343-ai).

@orizi orizi enabled auto-merge April 21, 2026 08:39
@orizi orizi added this pull request to the merge queue Apr 21, 2026
Merged via the queue into starkware-libs:main with commit 9de65e8 Apr 21, 2026
53 checks passed
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.

3 participants