Skip to content

Use boolean instead of 0/1 for condition check #93991

Description

@leikdga

Feature or enhancement

In Lib/filecmp.py, line 160, we use a variable ok to check a condition. We use 0/1 to denote false/true here. A better coding style is using False/True.

Pitch

First, using True/False itself is a better coding style.

Second, if 1 is slower than if True (although the difference is small).

Previous discussion

N/A

Activity

  1. changed the title [-]Use boolean instead of 0/1 for condition[/-] [+]Use boolean instead of 0/1 for condition check[/+] on Jun 18, 2022
  2. added a commit that references this issue on Jun 19, 2022
  3. added a commit that references this issue on Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions