The docs for BasePage.get() say:

pywikibot.exceptions.IsRedirectPageError – The page is a redirect. The argument 
of the exception is the title of the page it redirects to.

but that doesn't seem to be what's actually happening:

> from pywikibot import Site, Page
> from pywikibot.exceptions import IsRedirectPageError
> 
> site = Site("en")
> 
> page = Page(site, "Template:shortdescription")
> try:
>     print(page.get())
> except IsRedirectPageError as ex:
>     print(f"{ex.args=}")


prints

> ex.args=(Page('Template:Shortdescription'),)

Am I just not understanding the doc correctly?
_______________________________________________
pywikibot mailing list -- pywikibot@lists.wikimedia.org
Public archives at 
https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/6YC5X6ZKT5LGQ2BLHDDW7QYE2VPLQLVT/
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org

Reply via email to