boto/botocore — pull request #47 by jamesls (2013-05-11 00:15:24+00:00)
Title: Add Support for Wildcard Event Handlers

This pull request adds support for wildcard handlers which allow event handlers to specify that they'd like to be informed of events matching a specific pattern. For example, if I have an event handler that's subscribed to `foo.*.baz`, then the event handler will be called when these events are emitted:

* `foo.bar.baz`
* `foo.baz.baz`
* `foo.ANYTHING.baz`

This makes the code emitting events simpler as they only have to emit a single event and it makes event handlers more efficient because they don't have to make numerous subscriptions to all the events they're interested in, they only subscribe to a single wildcard event.

Event lookups are cached, and internally stored using a trie, so performance in artificial benchmarks seems reasonable, but we'll need to see how this does in real world situations.