Computer Science question (python list is slow with my cruddy algorithm )

Mr. Neutron nicktsocanos at charter.net
Fri Aug 23 14:00:05 EDT 2002


On Fri, 23 Aug 2002 10:49:42 -0400, Duncan Booth wrote:

> Terry Hancock <hancock at anansispaceworks.com> wrote in
> news:mailman.1030106632.6188.python-list at python.org:
> 
>> world = {}
>> world[(x, y)] = ( tuple of properties )
> 
> You can drop a lot of the parentheses from that expression.
>     world[x, y]
> works just as well as world[(x, y)] and is much easier to type. You
> don't need parentheses around the tuple of properties either, although
> some people prefer it.
> 
Actually I really do prefer the parentheses. It immediately tells me I am
looking at a tuple. I think it helps the code more readable for me.
I guess I can get used to it without parantheses too. It just looks more
like a real language to me with parantheses (X,Y,Z) then X,Y,Z. And it
looks more 'Computer Sciencey' for some reason to me.

It also makes me feel like I am hacking Lisp code. I wish I knew more
about Lisp (well Scheme) but I have never been able to find a good book
about it. I have one book that is so old and it really sucks at
explaining Lisp and Prolog. It is a cool book for the ideas but the code
examples leave me wondering how to actually do anything with Lisp. Except
for simple programs that pop and push values off of lists I am left
wondering what Lisp is all about and how to actually code in it.

I ordered a book on Scheme and never got it(The little Schemer). Oh well!

Now prolog is a whole nother nut ball, but it is actually a cool language
to and it is enjoyable like Python. But Python is much much easier to use
for real programs. And my Prolog is very weak.

But thanks for the insight!



More information about the Python-list mailing list