Added ',' thousands grouping to int.__format__. See PEP 378.
This is incomplete, but I want to get some version into the next alpha. I am still working on:
Documentation.
More tests.
Implement for floats.
In addition, there's an existing bug with 'n' formatting that carries forward to thousands grouping (issue 5515).
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index d3b598e..d5c2bea 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -583,6 +583,7 @@
#include "stringlib/transmogrify.h"
#define _Py_InsertThousandsGrouping _PyBytes_InsertThousandsGrouping
+#define _Py_InsertThousandsGroupingLocale _PyBytes_InsertThousandsGroupingLocale
#include "stringlib/localeutil.h"
PyObject *