Skip to content

Headline "Test for object identity should be is" doesn't match content #131

@hjp

Description

@hjp

Apart from being phrased the wrong way (the headline names the pattern, not the anti-pattern), it doesn't match the content.

The anti-pattern is about using is for equality tests, not about using something besides is for identity tests.

The headline should be changed to "Using is for equality testing" or something like that.

(There should probably also be an anti-pattern "Using == for identity testing" - I see stuff like x == None or (worse) x == True far more often than a misguided is)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions