jfhbrook / pyee

A rough port of Node.js's EventEmitter to Python with a few tricks of its own
https://github.com/jfhbrook/public
MIT License
371 stars 39 forks source link

once handlers much better behaved; internal refactor to support that; necessary and sane changes to listeners method #40

Closed jfhbrook closed 7 years ago

jfhbrook commented 7 years ago

Alternative to #39. Uses an OrderedDict instead of a list for storing events, so that we can key them by unwrapped functions.

Note that the listeners method no longer returns the raw events object but a list of its items as a snapshot; in other words, you can't mutate the listeners list directly anymore.