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 r.david.murray
Recipients jgsack, michael.foord, ncoghlan, pitrou, r.david.murray
Date 2009-12-12.15:36:23
SpamBayes Score 7.6515054e-05
Marked as misclassified No
Message-id <1260632186.25.0.555610737717.issue7396@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, rebinding a variable to a different type is something that is
considered an acceptable pattern in Python programs, at least in certain
circumstances.  Python programs generally use 'duck typing', and a list
and an iterable have equivalent semantics for the purposes of (most of)
the regrtest code.

On the other hand, regrtest is in general *not* an example of good
Python code, and really ought to be cleaned up at some point.  In
particular, the code blocks in regrtest are simply huge, and this makes
changing it very error prone, with "what type is this variable" being
just one example of the coupling problems.

Attached is a patch against trunk.  Please confirm that this fixes the
problems you found.
History
Date User Action Args
2009-12-12 15:36:26r.david.murraysetrecipients: + r.david.murray, jgsack, ncoghlan, pitrou, michael.foord
2009-12-12 15:36:26r.david.murraysetmessageid: <1260632186.25.0.555610737717.issue7396@psf.upfronthosting.co.za>
2009-12-12 15:36:25r.david.murraylinkissue7396 messages
2009-12-12 15:36:24r.david.murraycreate