def get_precision(currency):
 global _cache
 if (_cache is None):
  _cache = _generate_cache()
 return _cache[currency]

def get_precision ( currency ) : global _cache if ( _cache is None ) : _cache = _generate_cache ( ) return _cache [ currency ]
get precision for a given field .