]> granicus.if.org Git - python/commit
SF bug 433228: repr(list) woes when len(list) big.
authorTim Peters <tim.peters@gmail.com>
Sat, 16 Jun 2001 05:11:17 +0000 (05:11 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 16 Jun 2001 05:11:17 +0000 (05:11 +0000)
commita7259597f1f9ef389012010d7b8a02ebcf7396e7
tree7ada9cc6a3f30bc41999ba56da018ccd55342df8
parent239508cd1087a521ebe40fabc96c66dcb11c3f8c
SF bug 433228: repr(list) woes when len(list) big.
Gave Python linear-time repr() implementations for dicts, lists, strings.
This means, e.g., that repr(range(50000)) is no longer 50x slower than
pprint.pprint() in 2.2 <wink>.

I don't consider this a bugfix candidate, as it's a performance boost.

Added _PyString_Join() to the internal string API.  If we want that in the
public API, fine, but then it requires runtime error checks instead of
asserts.
Include/stringobject.h
Objects/dictobject.c
Objects/listobject.c
Objects/stringobject.c
Objects/tupleobject.c