Lines Matching full:reduce
116 REDUCE = 'R' # apply callable to argtuple, both on stack
290 reduce = dispatch_table.get(t)
291 if reduce:
292 rv = reduce(obj)
304 reduce = getattr(obj, "__reduce_ex__", None)
305 if reduce:
306 rv = reduce(self.proto)
308 reduce = getattr(obj, "__reduce__", None)
309 if reduce:
310 rv = reduce()
315 # Check for string returned by reduce(), meaning "save as global"
320 # Assert that reduce() returned a tuple
322 raise PicklingError("%s must return string or tuple" % reduce)
328 "two to five elements" % reduce)
330 # Save the reduce() output and finally memoize the object
351 raise PicklingError("args from reduce() should be a tuple")
355 raise PicklingError("func from reduce should be callable")
402 write(REDUCE)
1135 dispatch[REDUCE] = load_reduce