Skip to content

Override the __eq__ method. #34

Closed
Closed
@avara1986

Description

@avara1986

A class that defines attributes that are not present in its superclasses may need to override the eq() method (ne() should also be defined).

Adding additional attributes without overriding eq() means that the additional attributes will not be accounted for in equality tests.

class ConfFile(dict):

More info:
https://lgtm.com/rules/9990086/

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementNot a bug but... could be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions