Commits

Barry Warsaw committed ca72c05 Draft

hashCode(): throw a TypeError so dictionaries cannot be used as keys
in dictionaries. This fixes PR#119, but is controversial because I'm
not sure this won't have unintended side-effects.

  • Participants
  • Parent commits 027782d

Comments (0)

Files changed (1)

File org/python/core/PyDictionary.java

             l.addElement(e.nextElement());
         return new PyList(l);
     }
+
+    public int hashCode() {
+        throw Py.TypeError("unhashable type");
+    }
 }