[Chicago] List revolution

Joshua Herman zitterbewegung at gmail.com
Sun Sep 11 00:20:54 CEST 2011


When I first learned python I thought lists were linked lists having
com e from a Lisp background. Although, what is probably most likely
that python could do is introduce a LinkedList class and keep the name
of Lists.

The culture of Python has formed around list and the inertia of
changing that name is extremely high but people would easily see the
value of introducing a linked list class.

As for the syntax that Tal proposes I think its interesting but it has
the problem of breaking old code. Maybe in Python 4.x .

---Profile:---
http://www.google.com/profiles/zitterbewegung





On Sat, Sep 10, 2011 at 4:18 PM, Tal Liron <tal.liron at threecrickets.com> wrote:
> All joking (?!) aside, Python lists are more like arrays/vectors in other
> languages. It might make sense to introduce another basic type that's more
> list-like, like a linked list (and change the name of Python's 'list' to
> 'array'). A true list starts when it starts, and direct ordinal reference is
> often discouraged in favor of traversal. For beginners, this would put them
> on the right track for thinking in terms of dynamic data structures.
>
> Numbers are still applicable, but they are "counters" rather than confusing
> zero-or-one-based "indexers". Something like this:
>
> x = list()
> i = list.iterator()
> i.forward(3)
> i.insert('hi')
>
> It's clear what '3' means there. Of course, the Python Gods can decide to
> add some syntactic sugar in the language for it, something like this:
>
> x = list()
> i = list!
> i forward 3
> i! = 'hi'
>
> Compacted:
>
> (list! forward 3)! = 'hi'
>
> -Tal
>
> On 09/10/2011 10:03 AM, Tathagata Dasgupta wrote:
>
> What do guys think of list revolution?
>
> http://mail.python.org/pipermail/python-ideas/2011-September/011448.html
>
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>


More information about the Chicago mailing list