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

SourceForge.net noreply at sourceforge.net
Sun Oct 16 11:42:24 UTC 2011


Bugs item #3424343, was opened at 2011-10-16 13:21
Message generated for change (Comment added) 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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: xqt (xqt)
>Assigned to: xqt (xqt)
Summary: unexpected results 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


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

>Comment By: xqt (xqt)
Date: 2011-10-16 13:42

Message:
self.done in 9632

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

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