Reduce a function that is not pickleable via attribute lookup.
(self, func)
| 1256 | # function reducers are defined as instance methods of cloudpickle.Pickler |
| 1257 | # objects, as they rely on a cloudpickle.Pickler attribute (globals_ref) |
| 1258 | def _dynamic_function_reduce(self, func): |
| 1259 | """Reduce a function that is not pickleable via attribute lookup.""" |
| 1260 | newargs = self._function_getnewargs(func) |
| 1261 | state = _function_getstate(func) |
| 1262 | return (_make_function, newargs, state, None, None, _function_setstate) |
| 1263 | |
| 1264 | def _function_reduce(self, obj): |
| 1265 | """Reducer for function objects. |
no test coverage detected