Linked lists (was Re: Typing system vs. Java

Courageous jkraska1 at san.rr.com
Tue Aug 7 01:59:25 EDT 2001


>I don't care if I had to explicitly express that I want linked list,
>it just should be there. Or is the concept problematic in Python, for
>some reason?

There have been any number of creations of native Linked Lists for
Python over the years, all usually in spite of advice against doing
so (yours truly being one such head strong victim). 

Interpreter overhead in Python is high. The cost dispatching external
methods is high. This cost is high enough to hide all O(N) complexity
costs for most normal values of N.

If you have some special purpose linked list where N > 2000, it's
easy enough to find an extension to fit your purposes. But as for
the every day Python user, you have to admit that's a fairly special
case. It therefore wouldn't be justified putting it into the language
proper.

C//




More information about the Python-list mailing list