Commit 2f1d21d
committed
Return NotImplemented for unsupported expr RHS
Change _expr_richcmp to return NotImplemented for unsupported right-hand operand types instead of raising TypeError, and remove the explicit numpy.ndarray special-case. This allows Python to fall back to reflected comparison methods when the other operand can handle the comparison.1 parent c385d5e commit 2f1d21d
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | 63 | | |
66 | | - | |
| 64 | + | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
0 commit comments