Currently a pywikibot.Link.__repr()__ returns Link(self.title, self.site), omitting namespace, section and anchor/label.
As a result you cannot recreate the Link object from its representation.
This was one of the @TODOs from gerrit:442168
Currently a pywikibot.Link.__repr()__ returns Link(self.title, self.site), omitting namespace, section and anchor/label.
As a result you cannot recreate the Link object from its representation.
This was one of the @TODOs from gerrit:442168
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
pywikibot/core | master | +0 -7 | Removing @TODOs |
The namespace pehaps should be a part of the representation, but for the others, methods like section, anchor works instead. Page also doesn't show text or access rights on the first glance.
Anyway I would suggest to have some .fromLink() method to create a new Link from the old Link easily. I even think there is such method, isn't there?
Change 511399 had a related patch set uploaded (by Lokal Profil; owner: Lokal Profil):
[pywikibot/core@master] Removing @TODOs