summaryrefslogtreecommitdiff
path: root/Lib/difflib.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2004-07-30 11:38:22 +0000
committerArmin Rigo <arigo@tunes.org>2004-07-30 11:38:22 +0000
commit1dd04a02e03e1765d9f2096d979de92927337dcb (patch)
tree5bbc0038acb57ed18f360cd01b482c1c3ac685f6 /Lib/difflib.py
parenta37bbf2e5bf9d0854a774cdd1a972d0b7cc9e733 (diff)
downloadcpython-git-1dd04a02e03e1765d9f2096d979de92927337dcb.tar.gz
This is a reorganization of list_ass_slice(). It should probably be reviewed,
though I tried to be very careful. This is a slight simplification, and it adds a new feature: a small stack-allocated "recycled" array for the cases when we don't remove too many items. It allows PyList_SetSlice() to never fail if: * you are sure that the object is a list; and * you either do not remove more than 8 items, or clear the list. This makes a number of other places in the source code correct again -- there are some places that delete a single item without checking for MemoryErrors raised by PyList_SetSlice(), or that clear the whole list, and sometimes the context doesn't allow an error to be propagated.
Diffstat (limited to 'Lib/difflib.py')
0 files changed, 0 insertions, 0 deletions