New submission from Gabriel Koritzky <naoehomeuem...@gmail.com>:

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()

----------
messages: 88950
nosy: gabrielkfl
severity: normal
status: open
title: Simple For-Loops

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6207>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to