Re: Writing more efficient code

2007-01-03 Thread Hendrik van Rooyen
"Jon Harrop" <[EMAIL PROTECTED]> wrote: > I think that is an excellent idea. Who will pay me? ;-) The same fellow who is paying you to post to this newsgroup... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing more efficient code

2007-01-02 Thread bearophileHUGS
Jon Harrop: > I think this sort of functionality would be a welcome addition to Python. I don't know. > Perhaps it can be written in Python? Pyparsing and beautifulsoup show that practically useful parsing modules can be done using Python alone too. Set module of Python 2.3, translated to C in

Re: Writing more efficient code

2007-01-02 Thread Jon Harrop
[EMAIL PROTECTED] wrote: > Jon Harrop: >> I think most people could pick up the core ideas in a day and start >> writing working programs. > > Probably I am not that intelligent, I probably need some months :-) But > that language has many good sides, and one day I'll probably try to > learn it a

Re: Writing more efficient code

2007-01-02 Thread Jon Harrop
Beliavsky wrote: > If in the newsgroup comp.lang.x somone asks how to do y, and you > suggest using language z, without answering their question, which was > how to do it in x, you will likely just annoy people and perhaps make > it even less likely that they will try z. Pattern matching isn't a l

Re: Writing more efficient code

2007-01-02 Thread John Machin
On 2/01/2007 2:23 PM, gonzlobo wrote: > Thanks to John, Paul & Jon for their responses. This list is great for > info. Hi gonzlobo, Please dont use private e-mail; post to the Python mailing-list / newsgroup, so that everybody can see what the eventual outcome is. Please also answer the questi

Re: Writing more efficient code

2007-01-01 Thread Beliavsky
If in the newsgroup comp.lang.x somone asks how to do y, and you suggest using language z, without answering their question, which was how to do it in x, you will likely just annoy people and perhaps make it even less likely that they will try z. I have my own favorite language z and have not alwa

Re: Writing more efficient code

2007-01-01 Thread John Machin
gonzlobo wrote: > Greetings, and happyNewYear to all. > > I picked up Python a few weeks ago, and have been able to parse large > files and process data pretty easily, but I believe my code isn't too > efficient. I'm hoping dictionaries will help out, but I'm not sure the > best way to implement th

Re: Writing more efficient code

2007-01-01 Thread bearophileHUGS
Jon Harrop: > I think most people could pick up the core ideas in a day and start writing > working programs. Probably I am not that intelligent, I probably need some months :-) But that language has many good sides, and one day I'll probably try to learn it a bit. > Mathematica is expensive but

Re: Writing more efficient code

2007-01-01 Thread Paul McGuire
"gonzlobo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, and happyNewYear to all. > > I picked up Python a few weeks ago, and have been able to parse large > files and process data pretty easily, but I believe my code isn't too > efficient. I'm hoping dictionaries will h

Re: Writing more efficient code

2007-01-01 Thread Jon Harrop
[EMAIL PROTECTED] wrote: > Jon Harrop: >> OCaml's pattern matcher is very sophisticated and very fast. You'll >> probably shrink your code by several fold whilst also having it run a few >> orders of magnitude faster and having it statically checked, so it will >> be more reliable. > > You seem to

Re: Writing more efficient code

2007-01-01 Thread Diez B. Roggisch
gonzlobo schrieb: > Greetings, and happyNewYear to all. > > I picked up Python a few weeks ago, and have been able to parse large > files and process data pretty easily, but I believe my code isn't too > efficient. I'm hoping dictionaries will help out, but I'm not sure the > best way to implement

Re: Writing more efficient code

2007-01-01 Thread bearophileHUGS
Jon Harrop: > OCaml's pattern matcher is very sophisticated and very fast. You'll probably > shrink your code by several fold whilst also having it run a few orders of > magnitude faster and having it statically checked, so it will be more > reliable. You seem to forget some months of time to lear

Re: Writing more efficient code

2007-01-01 Thread Jon Harrop
gonzlobo wrote: > I picked up Python a few weeks ago, and have been able to parse large > files and process data pretty easily, but I believe my code isn't too > efficient. I'm hoping dictionaries will help out, but I'm not sure the > best way to implement them. > > I've been using a bunch of nest

Writing more efficient code

2007-01-01 Thread gonzlobo
Greetings, and happyNewYear to all. I picked up Python a few weeks ago, and have been able to parse large files and process data pretty easily, but I believe my code isn't too efficient. I'm hoping dictionaries will help out, but I'm not sure the best way to implement them. I've been using a bunc