def register(self,fn,vector_type): """Extends the current function with fn. This function will only be called if the first argument matches vector_type.""" # Check our arguments Optizelle.checkFunction("(de)serialize",fn) Optizelle.checkType("vector_type",vector_type) # Register the function self.fns[vector_type]=fn
def register(self, fn, vector_type): """Extends the current function with fn. This function will only be called if the first argument matches vector_type.""" # Check our arguments Optizelle.checkFunction("(de)serialize", fn) Optizelle.checkType("vector_type", vector_type) # Register the function self.fns[vector_type] = fn