2013/6/13 Merlijn van Deen <[email protected]>: > Hi Strainu, > > On 13 June 2013 17:07, Strainu <[email protected]> wrote: >> >> Is there some reason why the Page class does not have a getSize >> function, except the fact that it's trivial to obtain it from .get() ? > > > I don't think there was a specific design decision not to implement it, > other than 'no-one ever needed it'. It's also not entirely clear what 'size' > means in this context: the number of characters, the number of bytes in a > given encoding. > > What is the use case where you think it would be useful? >
Hi, I needed it today in order to compute some quick and simple statistics about a series of pages (e.g. "which were the largest deletion discussions in a given period"). Now that I think of it, I could probably use it to decide when I am likely to hit https://bugzilla.wikimedia.org/show_bug.cgi?id=43046 Alex's usecase is also interesting, but I'm not sure it's possible - I believe size would require an API call, which is almost as expensive as a get() for most pages. I think the meaning of "size" can be only one: the number of bytes, in order to make it simple to compare with what MediaWiki is showing in the history pages. Strainu _______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
