(self, name=None)
return self
save to file
save to file
save to file
def save(self, name=None):
        """save to file"""
        import pickle
        name = name if name else self.name
        fun = self.func
        del self.func  # instance method produces error
        pickle.dump(self, open(name + '.pkl', "wb" ))
        self.func = fun
        return self
def save ( self , name = None ) : import pickle name = name if name else self . name fun = self . func del self . func # instance method produces error pickle . dump ( self , open ( name + '.pkl' , "wb" ) ) self . func = fun return self