dictionary initialization
Dan Perl
danperl at rogers.com
Fri Nov 26 15:20:10 EST 2004
More information about the Python-list mailing list
Fri Nov 26 15:20:10 EST 2004
- Previous message (by thread): dictionary initialization
- Next message (by thread): dictionary initialization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Caleb Hattingh" <caleb1 at telkomsa.net> wrote in message news:opsh3pirx21js0xs at news.telkomsa.net... > 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. And just like that, the discussion turned religious. It's hard to assess someone's tone when it comes in writing, but, Caleb, you sound sarcastic and belligerent to me. Yes, 2 lines instead of 1 is an issue. And it is not the only example where the "explicit is better than implicit" principle shows a downside. However, addressing Weiguang's statements, I wouldn't say that python is less convenient than other languages (particularly awk, although I don't know that language), because I am sure we can find examples where python can implement something in a simpler way. Dan > Keep well > Caleb
- Previous message (by thread): dictionary initialization
- Next message (by thread): dictionary initialization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list