assert isinstance([], list)
2009/10/14 Russell Blau russblau@imapmail.org:
assert type(list()) is list
:-)
----- Original Message ----- From: filnik@svn.wikimedia.org To: pywikipedia-svn@lists.wikimedia.org Sent: Wednesday, October 14, 2009 1:03 PM Subject: [Pywikipedia-svn] SVN: [7464] trunk/pywikipedia/wikipedia.py
Revision: 7464 Author: filnik Date: 2009-10-14 17:03:38 +0000 (Wed, 14 Oct 2009)
Log Message:
Bugfix to the previous bugfix (-.-) == type(list()) not list()..
Modified Paths:
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
--- trunk/pywikipedia/wikipedia.py 2009-10-14 16:41:33 UTC (rev 7463) +++ trunk/pywikipedia/wikipedia.py 2009-10-14 17:03:38 UTC (rev 7464) @@ -1054,7 +1054,7 @@ while True: data = query.GetData(params, self.site(), encodeTitle = False) pageid = data[u'query'][u'pages'].keys()[0]
- if type(data['query']['pages'][pageid].values()[0]) ==
list(): # if it's not a list: no templates
- if type(data['query']['pages'][pageid].values()[0]) ==
type(list()): # if it's not a list: no templates for tmp in data['query']['pages'][pageid].values()[0]: count += 1 try:
Pywikipedia-svn mailing list Pywikipedia-svn@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l