Update common.py

Speed up optimization for formatCurrencyDigits().