We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f09f96 commit 7a4750aCopy full SHA for 7a4750a
autoclass/autoeq_.py
@@ -157,10 +157,14 @@ def __eq__(self, other):
157
"""
158
Generated by @autoeq. Relies on the hardcoded list of field names and "getattr" (object) for the value.
159
160
- for att_name in selected_names:
161
- if getattr(self, att_name) != getattr(other, att_name):
162
- return False
163
- return True
+ try:
+ for att_name in selected_names:
+ if getattr(self, att_name) != getattr(other, att_name):
+ return False
164
+ except AttributeError:
165
166
+ else:
167
+ return True
168
169
return __eq__
170
0 commit comments