Skip to content

Short-circuiting for boolean operators. #9

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions