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
1 Posted Topic
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.
The End.
tomas_petricek