16.11.2014 Views

callback patterns and idioms in Python

callback patterns and idioms in Python

callback patterns and idioms in Python

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Callback "dispatch<strong>in</strong>g"<br />

what if more than one <strong>callback</strong> is set for a<br />

s<strong>in</strong>gle event (or, Observable target)?<br />

remember <strong>and</strong> call the latest one only<br />

simplest, roughest<br />

remember <strong>and</strong> call them all<br />

LIFO? FIFO? or...?<br />

how do you _remove_ a <strong>callback</strong>?<br />

can one <strong>callback</strong> "preempt" others?<br />

can events (or state changes) be "grouped"?<br />

use object w/methods <strong>in</strong>stead of callable<br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!