I see in a couple of bots this construction:
for arg in pywikibot.handleArgs(*args):
Now, if I write instead of this
for arg in pywikibot.handleArgs():
the result seems to be just the same. I tried with valid global and with
unique parameters as well.
So, what is the difference?
I know the theory that * means a variable width argument list, but if I
omit it, the behaviour does > not change.
The behavior is the same if you run the script from the command line.
However, using (*args) also allows you the option of running the script from
inside the Python interactive interpreter; for example, if you were running
"replace.py Foo Bar -start:!", then you could "import replace" in the
interpreter and run <code>replace.main("Foo", "Bar",
This can be useful for debugging, among other things.