Code basics
Magnus Lie Hetland
mlh at idi.ntnu.no
Sun Mar 19 12:31:43 EST 2000
More information about the Python-list mailing list
Sun Mar 19 12:31:43 EST 2000
- Previous message (by thread): The PythonWin debugger hangs!
- Next message (by thread): Code basics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Moshe Zadka <moshez at math.huji.ac.il> wrote in message news:Pine.GSO.4.10.10003171839240.12462-100000 at sundial... > On Fri, 17 Mar 2000, JJ wrote: > > > I'm a C/C++/Java programmer and wonder how to make "code blocks" in Python. > > > > Please translate this to Python: > > while notDone: > int chip = this.getNumberOfSomething() > if chip == 0: > print "Tjohoo" > else: > print "Oh no!" > > With the customary 1.5 factor of LOCs reduce promised <wink> Actually - if you remove the illegal "int", then the reduction would be even greater, if you don't count the necessary whitespace which you have omittet ;) -- Magnus Lie Hetland magnus @ hetland . org
- Previous message (by thread): The PythonWin debugger hangs!
- Next message (by thread): Code basics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list