Menu

#1513 total-parameter for Page.getVersionHistory is incorrect

closed-fixed
rewrite (44)
5
2012-11-01
2012-09-18
Morten Wang
No

The documentation for getVersionHistory() describes the "total" parameter with: iterate no more than this number of revisions in total

This might be interpreted as getVersionHistory(total=25) would result in a revision list with len()==25, but that appears to not be the case. The attached test script prints out lengths that instead suggests the number of revisions returned equals sum(range(total+1)) (the sum of integers {1,2,...,25} is 325).

Output of version.py:
Pywikibot [http] branches/rewrite/scripts (r10525, 2012/09/16, 02:32:32)
Python 2.7.1 (r271:86832, Feb 8 2011, 09:38:37)
[GCC 4.2.3]
unicode test: triggers problem #3081100

Discussion

  • Morten Wang

    Morten Wang - 2012-09-18

    Test of calls to getVersionHistory() w/different values of "total" parameter

     
  • Russell Blau

    Russell Blau - 2012-11-01
    • status: open --> closed-fixed
     
  • Russell Blau

    Russell Blau - 2012-11-01

    Fixed in rev. 10647

     

Log in to post a comment.