SyntaxFix
Write A Post
Hire A Developer
Questions
Depending on your specific case, you could do:
>>> vars(x) == vars(y) True
See Python dictionary from an object's fields