For Python module MySQLdb, I would like to insert or update the database without doing a str() on my data (like int or float or whatever). I have version 1.2.3.
I googled around, looked at many different examples, and checked the API docs and all the examples I found for doing a database insert or update require doing generating a string from your int or float data and then calling the cursor.execute().
For Python module MySQLdb, can you insert or update without calling string format on integers or floats? If yes, how?
( As an aside, I'm not a fan of converting python int/float to str for an insert because it costs CPU and then the receiving mysql server process then has to do the str to int/float conversion which also costs CPU again. Additionally for floats if you do the string representation wrong... your float can lose precision ... or there is rounding sometimes... etc etc. )