Message86721
> Complex would be the first one. But that doesn't really bother me.
It bothers me a little. I see '' as a special case of the empty
presentation type, even if that's not what a strict reading of
PEP 3101 says, so I expect '', '>' '<20' all to format the
number in the same way, and only differ in their treatment of
alignment and padding. That is, adding a '>' to the start of a
format specifier shouldn't change the formatting of the number
itself. So from this perspective, it seems better if format(x, '')
ends up doing the same thing as str(x) as a result of the
choices made for the empty presentation type, rather than
as a result of special-casing ''.
> Although I guess if we wanted to, we could say that the empty
> presentation type is equivalent to 'g', but gives you parens.
This works for me.
[about suppressing real zeros...]
> Again, we could say that the empty presentation type is
> different in this regard.
Makes sense. Does treating the empty presentation type as special this
way add much extra complication to the implementation? |
|
Date |
User |
Action |
Args |
2009-04-28 10:26:42 | mark.dickinson | set | recipients:
+ mark.dickinson, gvanrossum, eric.smith, ajaksu2, mark |
2009-04-28 10:26:42 | mark.dickinson | set | messageid: <1240914402.07.0.216863664089.issue1588@psf.upfronthosting.co.za> |
2009-04-28 10:26:40 | mark.dickinson | link | issue1588 messages |
2009-04-28 10:26:39 | mark.dickinson | create | |
|