Stephen J. Turnbull wrote:
Raymond Hettinger writes:
Will start with Nick's simple proposal as a starting point.
[Nick Coghlan]
[[fill]align][sign][#][0][minimumwidth][,][.precision][type]
could maximumwidth be possible? It's useful if we rather break the display of the numbers than breaking the display of the table (and possibly add a special sign if width overflow occur, like <62432)
+1 for making that the stopping point, too.
I can't speak for the Chinese, but the Japanese also use the Chinese numbering system where the verbal expression of large numbers is grouped by 10000s. However, in tables of government expenditure and the like, the commas usually occur every three places. Eg, the official GDP figures from the Japanese Ministry of Economy and Trade:
Should there should be a convenience function that will help construct the format string. Some kind of: create_format(self, type='i', base=16, seppos=4, sep=':', charset='0123456789abcdef', maxwidth=32, minwidth=32, pad='0') -- (cookies for you if you noticed that it is ipv6 number format)