Josiah Carlson writes: > Lisp lists are really stacks
No, they're really (ie, concretely) singly-linked lists. Now, stacks are an abstract data type, and singly-linked lists provide an efficient implementation of stacks. But that's not what linked lists "really are". For example, singly-linked lists are also a reasonable way to implement inverted trees (ie, the node knows its parent, but not its children), which is surely not a stack. The Python use of "list" to denote what is concretely a dynamically extensible one-dimensional array confused me a bit. But what the heck, Guido needed a four-letter word to denote a concrete type used to implement a mutable sequence ADT, and he wasn't going to borrow one from that French guy on the ramparts, right? No big deal. Ahem... So the confusion here is that in Python, "list" denotes a particular concrete data type, while Steve H. is using a more abstract idea of list as mutable sequence to suggest there's a reason for optimizing certain mutations that Python's data type isn't good at. I don't think that's an effective way for him to make his point, unfortunately. But both usages are consistent with Python's usage; mutability is the usual way that lists are distinguished from tuples, for example, and the underlying dynamic array implementation is rarely mentioned. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com