Message88950
I don't know if something like this has been said before, so if it did
just ignore this.
I have noticed that very few programming languages use simple for loops.
Python itself doesn't have a really simple one. So here's my suggestion:
for ( value ):
# Repeats the code that follows 'value' times if value is an integer. If
it's a string or a list, repeats the code once per character or instance
on 'value'.
for ( iniINC , finalEXC ):
# Repeats the code that follows 'finalEXC - iniINC' times if they're
integers.
for ( variable , iniINC , finalEXC ):
# Assigns iniINC to variable and raises it by one until it reaches
finalEXC (not executing when it does).
#example1
for 70:
doNothing()
#example2
a = 10
for a:
doNothing()
#example3
a = 5
for ( a , 10 ):
doNothing()
#example4
i = 0
for ( i , 10 , 20 ):
doNothing() |
|
Date |
User |
Action |
Args |
2009-06-05 15:54:36 | gabrielkfl | set | recipients:
+ gabrielkfl |
2009-06-05 15:54:36 | gabrielkfl | set | messageid: <1244217276.14.0.120438841588.issue6207@psf.upfronthosting.co.za> |
2009-06-05 15:54:34 | gabrielkfl | link | issue6207 messages |
2009-06-05 15:54:33 | gabrielkfl | create | |
|