[Wolfram Hinderer]
> Yes, list building from a generator expression *is* expensive. And
> join has to do it, because it has to iterate twice over the iterable
> passed in: once for calculating the memory needed for the joined
> string, and once more to actually do the join (this is implementation
> dependent, of course). If the iterable is a list already, the list
> building is not needed.

Good analysis.  That is exactly what is going on under the hood.


Raymond
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to