[Pywikipedia-l] commit r5020
Nicolas Dumazet
nicdumz at gmail.com
Fri Jul 4 18:14:13 UTC 2008
Hello pywikipedia-l :)
Just found that bizarre line, among the old r5020 commit (mostly some
unsignificant code cleanup)
Index: wikipedia.py
===================================================================
--- wikipedia.py (révision 5019)
+++ wikipedia.py (révision 5020)
# leading colon implies main namespace instead of the default
if t.startswith(':'):
t = t[1:]
self._namespace = 0
else:
self._namespace = defaultNamespace
+ if not t:
+ raise Error(u"Invalid title '%s'" % title )
+
+ self._namespace = defaultNamespace
Since then, a Page object has always the defaultNamespace namespace
(!), which is what caught my attention.
However, what's that semicolon test two lines before ? If a title
starts by ':', it's in the main namespace ? I'm not quite sure of
this...
--
Nicolas Dumazet — NicDumZ [ nIk.d̪ymz ]
More information about the Pywikipedia-l
mailing list