Message86238
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 :-) |
|
Date |
User |
Action |
Args |
2009-04-21 15:30:51 | pitrou | set | recipients:
+ pitrou, dmbaggett |
2009-04-21 15:30:51 | pitrou | set | messageid: <1240327851.45.0.154085684361.issue5803@psf.upfronthosting.co.za> |
2009-04-21 15:30:50 | pitrou | link | issue5803 messages |
2009-04-21 15:30:49 | pitrou | create | |
|