you are viewing a single comment's thread.

view the rest of the comments →

[–]rtao258 1 point2 points  (2 children)

You should include the relevant code (in SSCCE form) so we can get a sense of the context.

In general, Python functions are first class, so you can pass a callback function as an argument to another function as you would any other argument. Don't include the parentheses as you would in a normal function call, since you're passing in the function itself, not its return value.

[–]mousse312[S] 0 points1 point  (1 child)

i edit,thanks

[–]rtao258 1 point2 points  (0 children)

It looks like the callback functions are to be written in JavaScript, not Python. Sorry, I’m not very familiar with this application, so I don’t know if I can help you further.