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

upgrade(subcls, underlying) #53

Closed jfhbrook closed 5 years ago

jfhbrook commented 5 years ago

This would generate an instance of subcls that attaches wrappers for all of underlying's current listeners. After the "upgrade", all changes to the returned instance will not be proxied to underlying.

This would be handy if someone generated a BaseEventEmitter with certain events already defined, but you know that you're working in a different environment and want to use a subclass.

jfhbrook commented 5 years ago

Closing in favor of the util in #57