We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6443de2 commit 910d557Copy full SHA for 910d557
1 file changed
src/org/python/core/PyStringMap.java
@@ -523,6 +523,19 @@ public boolean isSequenceType() {
523
return false;
524
}
525
526
+ @Override
527
+ public PyObject richCompare(PyObject other, CompareOp op) {
528
+ if (op == CompareOp.EQ && other instanceof PyDictionary) {
529
+ for (PyObject key: ((PyDictionary) other).keys_as_list().asIterable()) {
530
+ if (!get(key).equals(((PyDictionary) other).get(key))) {
531
+ return Py.False;
532
+ }
533
534
+ return Py.True;
535
536
+ return super.richCompare(other, op);
537
538
+
539
private abstract class StringMapIter<T> extends PyIterator {
540
541
protected final Iterator<T> iterator;
0 commit comments