Oh, interesting.
For those wondering, this is related to Link in pywikibot.page (rewrite branch).
What were you hashing Link objects for?
What about:
Index: pywikibot/page.py
===================================================================
--- pywikibot/page.py (revision 6639)
+++ pywikibot/page.py (working copy)
@@ -1945,7 +1945,13 @@
return cmp(self.namespace, other.namespace)
return cmp(self.title, other.title)
+ def __unicode__(self):
+ return self.astext()
+ def __hash__(self):
+ return hash(self.astext())
+
+
# Utility functions for parsing page titles
def html2unicode(text, ignore = []):
I believe that it should be correct, knowing that astext() should not
change from one instance to another.
--
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]
_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l