#NEWLINE# def register( self , type , reduce_func ) : #NEWLINE# #INDENT# if hasattr ( Pickler , 'dispatch' ) : #NEWLINE# #INDENT# def dispatcher( self , obj ) : #NEWLINE# #INDENT# reduced = reduce_func ( obj ) #NEWLINE# self . save_reduce ( * reduced , obj = obj ) #NEWLINE# #UNINDENT# self . dispatch [ type ] = dispatcher #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . dispatch_table [ type ] = reduce_func