Registers `func` and returns a unique token for this entry.
(self, func)
| 164 | return context.context()._handle # pylint: disable=protected-access |
| 165 | |
| 166 | def insert(self, func): |
| 167 | """Registers `func` and returns a unique token for this entry.""" |
| 168 | token = self._next_unique_token() |
| 169 | # Store a weakref to the function |
| 170 | self._funcs[token] = func |
| 171 | return token |
| 172 | |
| 173 | def remove(self, token): |
| 174 | """Removes the registered function corresponding to `token`.""" |
no test coverage detected