[Pywikipedia-bugs] [ pywikipediabot-Bugs-3424343 ] unexpected resuls of family.namespaces

SourceForge.net noreply at sourceforge.net
Sun Oct 16 11:21:50 UTC 2011


Bugs item #3424343, was opened at 2011-10-16 13:21
Message generated for change (Tracker Item Submitted) made by xqt
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3424343&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: xqt (xqt)
Assigned to: Nobody/Anonymous (nobody)
Summary: unexpected resuls of family.namespaces

Initial Comment:
try the following code:

>>> import wikipedia as wp
>>> site = wp.getSite()
>>> site.family.namespaces[6]['_default']
[u'File', u'Image']
>>> site.family.namespace('_default', 6, all=True)
(u'File', u'Image', u'file', u'image')
>>> site.family.namespaces[6]['_default']
[u'File', u'Image', u'File', u'Image']
>>> site.family.namespace('_default', 6, all=True)
(u'File', u'Image', u'file', u'image')
>>> site.family.namespaces[6]['_default']
[u'File', u'Image', u'File', u'Image', u'File', u'Image', u'File', u'Image']

site.family.namespaces gets duplicated every namespaces() call


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3424343&group_id=93107



More information about the Pywikipedia-bugs mailing list