dictionary initialization

Caleb Hattingh caleb1 at telkomsa.net
Fri Nov 26 21:07:29 EST 2004


Hi Weiguang

I know how it is when discussion becomes religious, and I want to avoid  
that.  First, I want to clarify exactly what it is that you are saying:

Would I be correct in saying that your point is that with awk, you can  
just do something like (ignore the syntax)

	(x not existing yet)
	x+=1

And have x = 1, while in Python you have to do

	(x not existing yet)
	x=0
	x+=1

And then have x=1?   Is this the question of debate here?  One line of  
initialisation to specify the type?

IF this is the point you are making, and the awk functionality demostrated  
in this particular example is a really significant feature for you in your  
specific problem domain, then I must concede that awk is probably right  
for you, and you shouldn't waste your time with Python.

Keep well
Caleb


On Fri, 26 Nov 2004 17:53:12 +0000 (UTC), Weiguang Shi  
<wgshi at namao.cs.ualberta.ca> wrote:

>
> You mean in Python, of course. I can see this is going the religious
> direction now.
>
> All in all, I've realized when a language generalizes and abstracts,
> it loses convenience. Because of this, however powerful other
> languages become, awk always has its place as long as the application
> is there.
>
> Weiguang




More information about the Python-list mailing list