I hereby claim:
- I am jeroenpelgrims on github.
- I am jeroenpelgrims (https://keybase.io/jeroenpelgrims) on keybase.
- I have a public key whose fingerprint is 2B08 0181 5480 1ACD 220D 5D88 DAD2 25EA 08C4 2380
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class Event(object): | |
def __init__(self): | |
self.__handlers = [] | |
def subscribe(self, handler): | |
self.__handlers.append(handler) | |
def unsubscribe(self, handler): | |
self.__handlers.remove(handler) |
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 |