Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #107.80K
~31.7K People Reached
Favorite Forums
Favorite Tags

1 Posted Topic

Member Avatar for ultimatebuster

class Callback: def __init__(self, fun, *args, **kwargs): self.fun = fun self.args = args self.kwargs = kwargs def __call__(self): self.fun(*self.args, **self.kwargs) def say(message): print(message) if __name__ == "__main__": callback = Callback(say, message="Hello") callback() This would be more general solution.

Member Avatar for tomas_petricek
1
32K

The End.