[Patches] [Patch #101138] 'for i indexing a in l': exposing the for-loop counter

noreply@sourceforge.net noreply@sourceforge.net
Wed, 9 Aug 2000 15:10:07 -0700


Patch #101138 has been updated. 

Project: 
Category: core (C code)
Status: Open
Summary: 'for i indexing a in l': exposing the for-loop counter

Follow-Ups:

Date: 2000-Aug-09 15:10
By: twouters

Comment:
This patch adds a way to get the loop counter in Python for-loops. The syntax is one Just quoted on python-dev today, which he attributes to Tim (and was probably proposed by half the thinking Python community by now ;)

It's a quick and dirty hack, but it works. There might be refcounting bugs and much more efficient ways to do it, but it works ;) It also lacks a test case and documentation.

-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101138&group_id=5470