The REALLY bad thing about Python lists ..

Gareth McCaughan Gareth.McCaughan at pobox.com
Sun May 14 18:27:27 EDT 2000


Michael Hudson wrote:

> (let ((result ()))
>   (dotimes (i n)
>     (rplacd (last result) (cons i nil))))
> 
> is O(n^2), yet people still manage to program in Common Lisp...

.. because they know that instead they can say

    (loop for i from 0 below n collect i)

-- 
Gareth McCaughan  Gareth.McCaughan at pobox.com
sig under construction



More information about the Python-list mailing list