This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jgsack
Recipients jgsack
Date 2009-11-26.04:50:11
SpamBayes Score 2.0201117e-07
Marked as misclassified No
Message-id <1259211015.26.0.0435309499535.issue7396@psf.upfronthosting.co.za>
In-reply-to
Content
file Lib/tests/regrtest.py
 
Evidently rev 76260 (trunk) / 76261 (py3k)
broke code at
  rev 76324 line 655 (py3k)
  rev 76321 line 620 (trunk) 
which is
   if tests[0] == alltests[i]  
because tests was rebound from a list to an iterable, and hence indexing 
cannot be performed on tests subsequent to the rebinding.

There are a few other places where tests is indexed, but I suspect those 
places are before the rebinding to an iterable.

At first glance, a viable patch might be to use a different name, eg 
itests, and leave the original tests list available for use by the line 
causing the TypeError. However, I think someone more knowledgeable needs 
to have a look.

Ummm, forgive me if this is offbase, but would it be fair to identify as 
a bad practice, the rebinding of a variable to a different type. 

~jim
History
Date User Action Args
2009-11-26 04:50:15jgsacksetrecipients: + jgsack
2009-11-26 04:50:15jgsacksetmessageid: <1259211015.26.0.0435309499535.issue7396@psf.upfronthosting.co.za>
2009-11-26 04:50:13jgsacklinkissue7396 messages
2009-11-26 04:50:12jgsackcreate