this is a part of a code for picroft skill:
def handle_command_intent(self, message): if message.data["command"].upper() == "BLINK": self.speak_dialog("ledblink")
the "data" and "command" and "speak" didn't define in the code how does python found what data is? how about the other?
another problem that i have is in the code below:
class iterable(object): def __init__(self, values): self.values = values self.location = 0
my question is why haven't location be put in the def arguments like below?
def __init__(self, values, location)
and why a function like below should be define?
def __iter__(self): return self
The code that i ask about is in github.com/MycroftAI/picroft_example_skill_gpio/blob/master/….