Hi,
I'm studying code for a Kivy app and am having trouble understanding a piece of syntax. For context, this is part of an app that lets a user drop a file into the app and then populates the file-name in the interface.
What does the for loop with the "i(*args)" statement do, exactly? I would understand if it were drops[i], but have no clue what i(*args) does.
Thanks. Happy to provide more details if that helps. Even a point in the right direction (i.e. a topic to look up) would be helpful.
I'm studying code for a Kivy app and am having trouble understanding a piece of syntax. For context, this is part of an app that lets a user drop a file into the app and then populates the file-name in the interface.
What does the for loop with the "i(*args)" statement do, exactly? I would understand if it were drops[i], but have no clue what i(*args) does.
Thanks. Happy to provide more details if that helps. Even a point in the right direction (i.e. a topic to look up) would be helpful.
1 2 3 4 5 6 7 8 |
class WeatherApp(App): def build( self ): self .drops = [] Window.bind(on_dropfile = self .handledrops) return DropFile() def handledrops( self , * args): for i in self .drops: i( * args) |