Register a registration function which will be called if the *toplevel* module (e.g. 'pandas') is ever loaded.
(self, toplevel, func=None)
| 730 | return wrapper(func) if func is not None else wrapper |
| 731 | |
| 732 | def register_lazy(self, toplevel, func=None): |
| 733 | """ |
| 734 | Register a registration function which will be called if the |
| 735 | *toplevel* module (e.g. 'pandas') is ever loaded. |
| 736 | """ |
| 737 | |
| 738 | def wrapper(func): |
| 739 | self._lazy[toplevel] = func |
| 740 | return func |
| 741 | |
| 742 | return wrapper(func) if func is not None else wrapper |
| 743 | |
| 744 | def dispatch(self, cls): |
| 745 | """Return the function implementation for the given ``cls``""" |