I'm coming from Tcl-world ...

Cameron Laird claird at starbase.neosoft.com
Fri Aug 2 16:49:54 CEST 2002


In article <slrnakl3mb.c05.Andreas.Leitgeb at pc7499.gud.siemens.at>,
Andreas Leitgeb <avl at logic.at> wrote:
			.
			.
			.
>1.) A 'for'-loop like in Tcl or in C, where you have separate
>   Init-, condition and increment-blocks, that control the loop.
>   (Of course, there's while, which can emulate all, but with that,
>   getting "continue" straight (that is: jump to the "increment-part" 
>   of the body) is probably some hassle ...)
			.
			.
			.
Andreas, you'd probably like Dave Beazley's *Python 
Essential Reference*.

The specific answer in this case is, use while, and
in fact the continue will do just what it should.
When in doubt, Python inclines to minimalism.  A C-
like "for (;;)" isn't really necessary, and Python
doesn't go to the trouble of cluttering itself up
with this and other superfluities.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list