Skip to content

Short-circuiting for boolean operators. #9

@kms70847

Description

@kms70847

Currently, and and or evaluate both operands, even if doing so is not necessary to calculate the result:


>>> True or 1/0
...
integer division or modulo by zero

It would be preferable for the operator to skip its second operand if the result can be calculated from the first operand. In the above example, the result would be True.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions