A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-July/102007.html below:

[Python-Dev] A suggestion

[Python-Dev] A suggestion [Python-Dev] A suggestionSteven D'Aprano steve at pearwood.info
Sat Jul 17 10:19:11 CEST 2010
On Sat, 17 Jul 2010 12:38:40 pm Brandon Hayden wrote:
> In the Python language, or any other language for that matter, I have
>  never understood why they don't have a loop function. Here's what I 
> mean, every time someone wants something to repeat itself, they have
> to  write a while loop like this:
>
> x = 0
> while x < 10:
>     function()
>     x = x + 1

Perhaps you should learn a little more Python before criticising it. The 
idiomatic way to write the above is:

for x in range(10):
    function()


Anyway, this is the wrong forum for this discussion. If you're still 
interested in it, please take it to comp.lang.python or 
tutor at python.org.



-- 
Steven D'Aprano
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4