[Chicago] List revolution

Sal Lara sal at spoton.com
Sun Sep 11 17:37:05 CEST 2011


Okay this is pretty embarrassing for me, as I totally didn't get that it was
a joke. Aware of the fact that I am speaking to a group of much more
experienced people, I humbly submit to you all that I still think starting
at 1 makes more sense. From a "natural semantics" perspective I mean, not
from a mathematical one. Zero is not a natural concept for the human mind.
You don't say "Well, I flew on an airplane for the zeroth time today!" or
"Bachelor number 0, what's your idea of a perfect date?". Back to the
Future, Back to the Future I, Back to the Future II? Nope.

Sal


On Sat, Sep 10, 2011 at 5:37 PM, Joshua Herman <zitterbewegung at gmail.com>wrote:

> Something like
> List = [1 , 2 , 3 , 4]
> traverse n in List:
>    n = n + 1
> Would return
>
> [2,3,4,5]
>
> This is really syntactic sugar for
>
> map(lambda x: x=x+1, List)
>
> On Sep 10, 2011, at 5:33 PM, Tal Liron wrote:
>
> On 09/10/2011 05:20 PM, Joshua Herman wrote:
>
> 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.
>
> Python has a lot of features inspired by functional languages: sequences,
> generators and (rather enervated) lambdas. I think the "for" and "yield"
> keywords support these very naturally and transparently for beginners and
> advanced programmers alike.
>
> Of course, we can all implement LinkedLists, etc., on our own via classes
> and functions. What I'm personally missing in Python is a natural syntax for
> iteration and traversal, as natural as "for" is. This traversal would be
> able to handle everything from singly-linked lists, through double-linked
> lists, to graphs and hypergraphs. And, at the other end, something like
> "yield" that can cleanly generate these traversable structures.
>
> Time for a PEP?
>
> -Tal
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20110911/0772725e/attachment.html>


More information about the Chicago mailing list