PEP 276 (was Re: Status of PEP's?)
Bengt Richter
bokr at oz.net
Sat Mar 9 16:29:09 EST 2002
On Sat, 9 Mar 2002 13:09:39 +0000, philh at comuno.freeserve.co.uk (phil hunt) wrote:
[...]
>
>One possibility might be a new looping construct, do:
>
> do 5:
> print "this will be printed 5 times"
>
>Note that you can't get hold of a do loop's loop variable. This
>would be easy to optimise, I imagine.
Well, since we're messing with the language,
keywords could have attributes, e.g.,
do 5:
print "index from the do: %d", do.index
or
for x in aList:
print 'Item %2d: %s' % (for.index, x)
I'm not serious, I think ;-)
Regards,
Bengt Richter
More information about the Python-list
mailing list