summaryrefslogtreecommitdiff
path: root/Lib/re.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-01-31 18:53:21 +0000
committerGuido van Rossum <guido@python.org>2003-01-31 18:53:21 +0000
commit25cb7dfb0f0c32b51a813869f4ef3ab25cba5b2a (patch)
tree99e20403f50c402d21e36a5ad1f88d3bc3af9a33 /Lib/re.py
parentf9b0cc7df6f5d0c9350edb4b587b851170fdeb18 (diff)
downloadcpython-git-25cb7dfb0f0c32b51a813869f4ef3ab25cba5b2a.tar.gz
Another extension to reduce(). It can return a 4- or 5-tuple now.
The 4th item can be None or an iterator yielding list items, which are used to append() or extend() the object. The 5th item can be None or an iterator yielding a dict's (key, value) pairs, which are stuffed into the object using __setitem__. Also (as a separate, though related, feature) add "batching" for list and dict items. If you pickled a dict or list with a million items in the past, it would push a million items onto the stack. It now pushes only 1000 items at a time on the stack, using repeated APPENDS or SETITEMS opcodes. (For lists, I hope that using many short extend() calls doesn't exhibit quadratic behavior.)
Diffstat (limited to 'Lib/re.py')
0 files changed, 0 insertions, 0 deletions