Skip to content

feat(expressions): add truthiness semantics for constant boolean expressions#13

Open
abnobdoss wants to merge 1 commit into
mainfrom
fix/issue-3543-truthiness
Open

feat(expressions): add truthiness semantics for constant boolean expressions#13
abnobdoss wants to merge 1 commit into
mainfrom
fix/issue-3543-truthiness

Conversation

@abnobdoss

Copy link
Copy Markdown
Owner

No description provided.

…essions

AlwaysTrue and AlwaysFalse now define __bool__ so they evaluate to True and
False in control flow. All other BooleanExpressions raise TypeError on bool()
to prevent ambiguous truthiness checks: negation is the ~ operator and
expressions should be compared explicitly.
@abnobdoss abnobdoss closed this Jun 25, 2026
@abnobdoss abnobdoss reopened this Jun 25, 2026
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.

1 participant