Python inserts a colon in a Decimal number from Access via pyodbc
问题 I'm having the same problem as this guy and possibly this guy, but I am around to share some code and respond to questions! I have some code in a batch job that reads fields from a Microsoft Access database via pyodbc and prepares the output for display. Here is a snippet. Note the assert. def format_currency(amount): if amount is None: return "" else: result = "$%.2f" % amount assert ":" not in result, ( "That's weird. The value %r of class %s is represented as %s" % (amount, amount.__class_