Created
June 16, 2014 01:45
-
-
Save daboross/ff8d4a954c5a0f288b74 to your computer and use it in GitHub Desktop.
Concise example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseEvent: | |
def __init__(self, bot=None, conn=None, hook=None, base_event=None): | |
self.bot = bot | |
self.conn = conn | |
self.hook = hook | |
if base_event is not None: | |
# We're copying an event, so inherit values | |
if self.bot is None and base_event.bot is not None: | |
self.bot = base_event.bot | |
if self.conn is None and base_event.conn is not None: | |
self.conn = base_event.conn | |
if self.hook is None and base_event.hook is not None: | |
self.hook = base_event.hook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment