StringChain -- a data structure for managing large sequences of chunks of bytes
Lie Ryan
lie.1296 at gmail.com
Sat Mar 27 15:48:21 EDT 2010
On 03/22/2010 07:07 PM, Steven D'Aprano wrote:
> Perhaps you should have said that it was a wrapper around deque giving
> richer functionality, rather than giving the impression that it was a
> brand new data structure invented by you. People are naturally going to
> be more skeptical about a newly invented data structure than one based on
> a reliable, component like deque.
Well, technically StringChain is not a data structure in the first
place. StringChain is a string; a string that is implemented using deque
data structure to make appending algorithmically efficient. It is not a
data structure, in the sense that I can't put arbitrary "thing" into the
data structure. In the same sense, "string" is also not a data structure
as "string" is an implementation of stream using "array" data structure;
"StringChain" is an implementation of stream using "deque" data structure.
More information about the Python-list
mailing list