https://bugzilla.wikimedia.org/show_bug.cgi?id=55149
--- Comment #5 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- You don't need to create the DataPage a second time with the 'entity' item. Look at this sample which shows that data == d but they are different objects in this sample:
>>> import wikipedia as wp >>> s = wp.getSite() >>> p = wp.Page(s, 'Helium') >>> d = wp.DataPage(p) >>> i = d.get() >>> t = i['entity'].title() >>> data = wp.DataPage(s.data_repository(), t) >>> data DataPage{[[wikidata:Q560]]} >>> d DataPage{[[wikidata:Q560]]} >>> d is data False >>> d == data True >>>