def _procedural_reloading(self,gen=[],*args):
if len(gen):
gen.pop().reload()
Clock.schedule_interval(functools.partial(
self._procedural_reloading,gen=gen),.5)
In above code, _procedural_reloading() is a method of a class and it gets a list which contains some images and tries to reload() them one by one. Guess what, it doesn't work because it says that _procedural_reloading got multiple values for keyword gen!
The odd thing is if I pass gen as an argument (not as a keyword argument) it works just fine, here:
def _procedural_reloading(self,gen=[],*args):
if len(gen):
gen.pop().reload()
Clock.schedule_interval(functools.partial(
self._procedural_reloading,gen),.5)
why gen=gen doesn't work?
To elaborate it more, until now I couldn't pass any keyword argument with Clock even once! I always have to arrange the arguments one by one by order and pass them... is it a known issue? or have I done something wrong there? I feel stupid!
Edit:
gen without default value also doesn't work in my case:
def _procedural_reloading(self,gen,*args):
if len(gen):
gen.pop().reload()
Clock.schedule_interval(functools.partial(
self._procedural_reloading,gen=gen),.5)