Re: loop control in Python

2002-04-26 Thread Patricia J. Hawkins
> "JS" == Jeff Shannon <[EMAIL PROTECTED]> writes: JS> Python was designed with the thought that the average programmer spends JS> *far* more time *reading* code than writing code. So the intent of Python JS> syntax is to make code that is easy to *read*, even if it takes a little bit JS

Re: loop control in Python

2002-04-26 Thread Jeff Shannon
[EMAIL PROTECTED] wrote: > The range() function a nice one to create a list and enumerate it with a > 'foreach'. > But it creates a static list and enumerates it. > The spice of 'for' of perl, java, C and ... is that you haven't know the > list before you enumerate it. Which creates all sorts

RE: loop control in Python

2002-04-26 Thread David Rogers
try 'for in' as in: def func(aref): return [aref] * 3 a = 'else!' for b in func(a): print 'something' + b #David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 4:29 AM To: [EMAIL PROTE

Re: loop control in Python

2002-04-26 Thread roger . day
some C compilers - on Mac or Irix - will warn you about that sort of behaviour (even if you put brackets around it). There are the infinite loops and the infamous one = test traps (a == comparison is needed, but a = is left off). perl -we while($line=) At 26/04/2002 12:29:01, [EMAIL PROTECTED] w

loop control in Python

2002-04-26 Thread janos . juhasz
The range() function a nice one to create a list and enumerate it with a 'foreach'. But it creates a static list and enumerates it. The spice of 'for' of perl, java, C and ... is that you haven't know the list before you enumerate it. It is frustrate me when i tried : while b = func(a): pr

Re: loop control in python

2002-04-26 Thread Amund Tveit
/~amundt/ - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 26, 2002 11:58 AM Subject: loop control in python > Python was my biggest surprise last year. I found it be very usefull and > tasty. The IDLE gives really fantastic opportuni

Re: loop control in python

2002-04-26 Thread roger . day
for i in range(1,5): print i At 26/04/2002 10:58:13, [EMAIL PROTECTED] wrote: # Python was my biggest surprise last year. I found it be very usefull and # tasty. The IDLE gives really fantastic opportunities. It is really GRAND. # My only problem with python is the missing 'for '. # The

AW: loop control in python

2002-04-26 Thread Frank, Christoph
How about: for i in range(100): ? Best Regards, Christoph Frank email: [EMAIL PROTECTED] >> -Ursprüngliche Nachricht- >> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >> Gesendet: Freitag, 26. April 2002 11:58 >> An: [EMAIL PROTECTED] >> B

loop control in python

2002-04-26 Thread janos . juhasz
Python was my biggest surprise last year. I found it be very usefull and tasty. The IDLE gives really fantastic opportunities. It is really GRAND. My only problem with python is the missing 'for '. The for statement in python seems to be a foreach and the 'while 1:' is really a strange 'acce