In [1]:
def printer(*args, **kwargs):
print args, kwargs
def pretty_printer(*args, **kwargs):
import pprint
pprint.pprint(args)
pprint.pprint(kwargs)
def errorer(*args, **kwargs):
raise Exception
In [2]:
from notify.signal import Signal
do = Signal()
In [3]:
do.connect(printer)
do.connect(pretty_printer)
In [4]:
do(1, 2, a=3)
In [6]:
do.connect(printer)
do(1, 2, a=3)
In [7]:
do2 = Signal()
do2.connect(errorer)
do2.connect(printer)
do2(1, 2, a=3)
Overall: very low
In [ ]: