Rich <miserlou+pyth...@gmail.com> added the comment: Yep, as I mentioned, it should be configurable to use either format. Localization is an excellent point as well, so, all in all, the optional arguments to the function are format, significant digits, and delimiter. That's not an unreasonable amount of configurability.
It's not a complex problem, the solutions are fairly simple, but there are many ways to shoot yourself in the foot when rolling your own. There are already many packages which attempt this, most of which aren't used by any serious projects, who instead use their own implementations. There are just as many snippets of partial solutions floating around the internet as well. There is no canonical way to solve this common problem. This is exactly why this common functionality should be added to the standard library, so that this extremely common function doesn't have to be imported from some-random-jamook's-untrustworthy-project-on-PyPI or rewritten from scratch for every project. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31749> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com