SIGN IN SIGN UP

SF Patch 685051: fix for 680789: reprs in arraymodule

(contributed by logistix; substantially reworked by rhettinger).

To create a representation of non-string arrays, array_repr() was
starting with a base Python string object and repeatedly using +=
to concatenate the representation of individual objects.

Logistix had the idea to convert to an intermediate tuple form and
then join it all at once.  I took advantage of existing tools and
formed a list with array_tolist() and got its representation through
PyObject_Repr(v) which already has a fast implementation for lists.
R
Raymond Hettinger committed
88ba1e39ecf32d0a2328358351fff3006a5b30b9
Parent: 444e434