https://bugzilla.wikimedia.org/show_bug.cgi?id=55149

--- Comment #5 from Kunal Mehta (Legoktm) <[email protected]> ---
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:

&gt;&gt;&gt; import wikipedia as wp
&gt;&gt;&gt; s = wp.getSite\(\)
&gt;&gt;&gt; p = wp.Page\(s, 'Helium'\)
&gt;&gt;&gt; d = wp.DataPage\(p\)
&gt;&gt;&gt; i = d.get\(\)
&gt;&gt;&gt; t = i\['entity'\].title\(\)
&gt;&gt;&gt; data = wp.DataPage\(s.data\_repository\(\), t\)
&gt;&gt;&gt; data
DataPage\{\[\[wikidata:Q560\]\]\}
&gt;&gt;&gt; d
DataPage\{\[\[wikidata:Q560\]\]\}
&gt;&gt;&gt; d is data
False
&gt;&gt;&gt; d == data
True
&gt;&gt;&gt;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to