Y
Hacker News
new
|
ask
|
show
|
jobs
by
int_19h
526 days ago
One trick for this is to use the decorator syntax, e.g.:
@foo.on_click def foo_clicked(): ...
Of course, for this, foo.on_click needs to be a callable function rather than a property.