Decorator for adding python functions to self
(self, f, o_len=None, pure=False)
| 121 | return f |
| 122 | |
| 123 | def define(self, f, o_len=None, pure=False): |
| 124 | """Decorator for adding python functions to self""" |
| 125 | name = f.__name__ |
| 126 | if hasattr(self, name): |
| 127 | raise ValueError("Cannot override existing symbol", name) |
| 128 | return self._define(f, o_len, pure) |
| 129 | |
| 130 | def define_if_new(self, f, o_len=None, pure=False): |
| 131 | """Pass silently if f matches the current implementation |