A
Andreas Neudecker
Hello.
I am relatively new to Python and I have a strange problem with some
code. In a class the __call__ method gets parameters like this:
class WhatsUp:
__call__ (
self,
var1,
var2 = '',
*moreVars,
**moreNamedVars,
):
pass
I always get an error for the **moreNamedVars, line where the '^' points
at the comma at the end (or, if I remove the comma, it points at the
colon). I also tried commenting-out the other variables passed to the
method. Same result.
I assumed the order of variables and variable lists of variables had to
be like this? What is wrong?
Kind regards
Andreas
I am relatively new to Python and I have a strange problem with some
code. In a class the __call__ method gets parameters like this:
class WhatsUp:
__call__ (
self,
var1,
var2 = '',
*moreVars,
**moreNamedVars,
):
pass
I always get an error for the **moreNamedVars, line where the '^' points
at the comma at the end (or, if I remove the comma, it points at the
colon). I also tried commenting-out the other variables passed to the
method. Same result.
I assumed the order of variables and variable lists of variables had to
be like this? What is wrong?
Kind regards
Andreas