Mark Dickinson <dicki...@gmail.com> added the comment:

> 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?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1588>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to