diff options
| author | Mads Jensen <mje@inducks.org> | 2017-09-28 11:39:12 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-09-28 09:18:37 -0400 |
| commit | 4508fafe16e37960769bbe170fd9729910d7d2ce (patch) | |
| tree | b8b6abde678360b082235124e68a8d26c9ac1e3e /django/utils | |
| parent | 129f4900be086e373123f7d17ca0afb87fb91369 (diff) | |
Simplified various __eq__() methods.
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/tree.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/django/utils/tree.py b/django/utils/tree.py index 74612736f1..392838b482 100644 --- a/django/utils/tree.py +++ b/django/utils/tree.py @@ -64,11 +64,11 @@ class Node: return other in self.children def __eq__(self, other): - if self.__class__ != other.__class__: - return False - if (self.connector, self.negated) == (other.connector, other.negated): - return self.children == other.children - return False + return ( + self.__class__ == other.__class__ and + (self.connector, self.negated) == (other.connector, other.negated) and + self.children == other.children + ) def add(self, data, conn_type, squash=True): """ |
