New submission from Eric Smith <e...@trueblade.com>: PEP 378 says that the ',' format option applies to types 'd', 'e', 'f', 'g', 'E', 'G', '%' and 'F'. I think this should also be extended to include the empty type ''.
This only makes a difference for floats. For ints, '' is the same as 'd', but for floats '' is distinct. In 3.1 we get this behavior: >>> format(1.2, '010.2') '00000001.2' >>> format(1.2, '010,.2') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: Cannot specify ',' with ''. I think the second example should be valid. ---------- assignee: eric.smith components: Interpreter Core keywords: easy messages: 86075 nosy: eric.smith, marketdickinson, rhettinger priority: normal severity: normal status: open title: ',' formatting with empty format type '' (PEP 378) type: behavior versions: Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5782> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com