2015-08-12 7:40 GMT+02:00 <info(a)gno.de>de>:
You asked "is there a way..." and I assumed
"without changing the current
code" ;)
Yes, but by that time I already wrote that I had changed the code in my
working copy. Theoretically, your solution is really interesting, but as
far as I see, for core users only, and it is anyway slower.
On the other hand it might be an idea to implement such a toggle option
but your proposal might not be an appropriate way. pagegenerators has
PageWithTalkPageGenerator which does toggling the page. Combined with
-namespace option the needed namespace could be filtered. This would allow
toggling of all generators.
I don't see how. Of course, I found this generator with this description:
"""
Wraps around another generator. Yields the same pages, but for non-talk
pages, it also includes associated talk pages.
This generator does not check if the talk page in fact exists.
"""
This has two problems:
1. Does not work in the direction I wanted, from talk to subject
namespace, just from subject to talk.
2. Does not list only toggled pages but both original and toggled ones,
which is not good for me and generally to speak not a clean solution.
You are right that a general ToggleGenerator wrapper would be better
solution than mine, but this is not it.