Convert Python values to MySQL values

def _conv(self,v):
        """Convert Python values to MySQL values"""
        if isinstance(v,str):
            return '"%s"' %v.replace("'","''")
        elif isinstance(v,datetime.datetime):
            if v.tzinfo is not None:
                raise ValueError,\
                    "datetime instances with tzinfo not supported"
            return '"%s"' %self.db_module.Timestamp(v.year,v.month,v.day,
                v.hour,v.minute,v.second)
        elif isinstance(v,datetime.date):
            return '"%s"' %self.db_module.Date(v.year,v.month,v.day)
        else:
            return v