Re: pre-PEP: Simple Thunks

2005-04-16 Thread peufeu
I think your proposal is very interesting, I've been missing code blocks in Python more and more as time goes by. I'll answer to both the 'thunks proposal and the suite-based keywords proposal here. I find the Ruby syntax rather dirty though, because it has a lot of implicit stuff,

Re: pre-PEP: Suite-Based Keywords

2005-04-16 Thread peufeu
How would you write if f(x=1): print yes using suite-based keyword args? Good point. Then we should remove the extra ':' at the end of the function invocation : if f(x=@): value of x print yes if f(@**): x: value of x print yes --

Re: Is Python appropriate for web applications?

2005-04-15 Thread peufeu
The first one was a typo in the name of a variable ($actegories instead of $categories). Instead of raising an exception, this b**d programming language (err...) just created a new variable with a NULL value. Doh :-( Set error reporting to all. Marvel at how it reports this simple typo in a

Re: preallocate list

2005-04-13 Thread peufeu
what about : factors = [map(float, line.split()) for line in file] should be a hell of a lot faster and nicer. for line in f: factor = [] tokens = line.split() for i in tokens: factor.append(float(i))

Re: database in python ?

2005-04-13 Thread peufeu
postgresql is slower than MySQL, at least for modest size tables. There must, I When not using transactions, MySQL will blow away postgres in INSERT/UPDATE speed until the concurrency gets up a bit and the readers block writers strategy used by MyISAM starts to show its weaknesses. This is

Re: Python documentation moronicities (continued)

2005-04-12 Thread peufeu
I sympathize with you and also think there should be an add comment in the Python documentation website, so that users could post their code snippets in the relevant places. I found the Howto through Google. Somehow I didn't see that link in the documentation. And please do not make any