Skip to content

Instantly share code, notes, and snippets.

Jeroen Pelgrims resurge

Block or report user

Report or block resurge

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View gist:3142854

test test

foo = 1
bar = 2


resurge / python
Created Aug 27, 2010
In relation to this blog post: and the question posed in the comments. Would like some help improving the code.
View python
class Event(object):
def __init__(self):
self.__handlers = []
def subscribe(self, handler):
def unsubscribe(self, handler):
View mkdict
from mkdict import mkdict
d = mkdict({
'key1' : 'value1', #regular dictionary usage
('key2', 'key3') : 'value2' #these tuple keys will be unpacked to regular keys
print d['key1'] #value1
print d['key2'] #value2
print d['key3'] #value2
You can’t perform that action at this time.