sorry, use old rev. have fix

2009/4/27, Nicolas Dumazet <nicd...@gmail.com>:
> 2009/4/27  <shiz...@svn.wikimedia.org>:
>> Revision: 6736
>> Author:   shizhao
>> Date:     2009-04-27 13:06:57 +0000 (Mon, 27 Apr 2009)
>>
>> Log Message:
>> -----------
>> fix bug 2780178: repeat = True, can't agian load new
>
>> -        if lestart is not None: params['lestart'] = lestart
>> -        if leend is not None: params['leend'] = leend
>> -        if leend is not None: params['leuser'] = leuser
>> -        if leend is not None: params['letitle'] = letitle
>> +        if lestart != None: params['lestart'] = lestart
>> +        if leend != None: params['leend'] = leend
>> +        if leend != None: params['leuser'] = leuser
>> +        if leend != None: params['letitle'] = letitle
>
> Please don't change "is not None" to "!= None", the first expression
> is cleaner, and faster (see rev 6686 by Francesco :
> https://fisheye.toolserver.org/changelog/pywikipedia/?cs=6686 )
>
>> [rest of diff]
>
> It looks like the diff is not fixing the issue. With repeat=True, the
> same query will be sent over and over, with the same parameters,
> returning the same values, and.... never exiting.
>
> And... actually, it seems that a lot of functions implement this
> rather useless behavior:
> newpages, longpages, shortpages, categories, deadenpages,
> ancientpages, lonelypages, unwatchedpages,
> (uncategorized|unused)(categories|images), withoutinterwiki,
> randompages, and randomredirectpages.
>
>
> Ah, wait. I see a TODO by Russell:
>
>         #TODO: should use offset and limit parameters; 'repeat' as now
>         #      implemented is fairly useless
>         # this comment applies to all the XXXXpages methods following, as
> well
>
> Ah, it's been sitting here since October 2007 :)
>
> --
> Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>


-- 
Chinese wikipedia: http://zh.wikipedia.org/
My blog: http://shizhao.org
twitter: https://twitter.com/shizhao

[[zh:User:Shizhao]]

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to