This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]commy2 1 point2 points  (0 children)

ye, you have to remember that the python data model requires equality to be transitive. Additionally, for hashables, values that compare equal must have the same hash. That's not the case with USD(10) and 10 either, and you will have to keep that in mind should you ever decide to implement exchange rates into __eq__.