Antoine Pitrou <pit...@free.fr> added the comment:

The patch must be against the SVN trunk, in standard unified diff ("svn
diff" does the trick).

What do you call standard arrays? Do you mean the builtin list type?
Storing one separate character per list element is a poor choice because
it will waste a lot of memory. The array.array type is more efficient
for this.

However, there are two other, more idiomatic ways of doing this:
- accumulate the chunks of encoded/decoded data into a list (but not
only 1-character strings...) and join() them at the end.
- or, use a StringIO object (from the cStringIO module)

Bonus points if you time all three possibilities and submit the fastest :-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5803>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to