Files
catalyst/zipline/dispatch.py
T
Jeremy Blow acc49ef9aa BUG: Don't delete namespace if import fails.
datashape should be optional, this ensures it is actually optional.
2016-06-02 11:05:53 -07:00

22 lines
408 B
Python

"""dispatcher object with a custom namespace.
Anything that has been dispatched will also be put into this module.
"""
from functools import partial
import sys
from multipledispatch import dispatch
try:
from datashape.dispatch import namespace
except ImportError:
pass
else:
globals().update(namespace)
del namespace
dispatch = partial(dispatch, namespace=globals())
del partial
del sys