Message358576
Mark, I mostly agree with your classifications / proposals.
Regarding cases 3-7 I'd like to suggest a slightly different resolution:
Following my interpretation of the spec ("use zeropad *only* if no align is given"), "<020", ">020", "^020" and "=020" would be treated equivalent to "<20", ">20", "^20" and "=20":
format(12345, "<020") -> '-12345 ', not '-1234500000000000000'
format(12345, ">020") -> ' -12345', not '00000000000000-12345'
format(12345, "^020") -> ' -12345 ', not '0000000-123450000000'
format(12345, "=020") -> '- 12345', not '-0000000000000012345'
For '<', '>' and '^' I can't imagine any code depending on the current behaviour of int and float, so this change is unlikely to break anything.
For '=' it might be reasonable to make an exception (and state it in the doc), so that "020", "=020", "0=020" and "0=20" are treated as equivalent.
For Decimal this would mean to loosen the behaviour, as you proposed. |
|
Date |
User |
Action |
Args |
2019-12-17 21:06:49 | mamrhein | set | recipients:
+ mamrhein, rhettinger, facundobatista, mark.dickinson, eric.smith, skrah |
2019-12-17 21:06:49 | mamrhein | set | messageid: <1576616809.85.0.92458789694.issue39077@roundup.psfhosted.org> |
2019-12-17 21:06:49 | mamrhein | link | issue39077 messages |
2019-12-17 21:06:49 | mamrhein | create | |
|