how to join array of integers?
Arnaud Delobelle
arnodel at googlemail.com
Mon Sep 17 14:01:48 EDT 2007
On Sep 17, 4:57 pm, Paul Rudin <paul.nos... at rudin.co.uk> wrote:
[...]
> Although it's not clear to me why the join method needs a sequence
> rather than just an iterator.
Pure guess (I haven't looked at the code): the join method needs to
know the length of the string it builds in order to allocate the
correct amount of memory, therefore needs to traverse the iterable
object it is joining *twice* (find the length, allocate, fill in)?
--
Arnaud
More information about the Python-list
mailing list